Re-name types in policy#937
Open
tcharding wants to merge 7 commits intorust-bitcoin:masterfrom
Open
Conversation
Currently the `policy::Concrete` and `policy::Semantic` types are alias'. We would like to refer to them as `policy::Policy` and `policy::semantic::Semantic` (according to a review suggestion). I believe this is to make it more clear that one shouldn't need to use the semantic policy? Deprecation doesn't work for type alias', just use a code comment to show what is going no. Deprecate the old alias'. Re-export `concrete::Policy` by its own name. Add an alias to `semantic`. Next we will remove the alias and re-name the `semantic::Policy` type. Done separately to make it super obvious what is going on.
To differentiate it from the concrete policy (I think).
After the re-name this stutters. Import type and remove the path.
Introduce a `pollicy::lift` module and move the lifting types and logic there. Add deprecated re-exports although these may not function correctly, I didn't check.
Now we have done re-names and the concrete policy is the 'first class' type in `policy` inline the logic from the submodle to `policy/mod.rs`.
Just use `Policy` now we have done all the re-names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As described here: #885 (comment)
Big diff but this is mostly re-names and code moves. I split it up in steps. First might be best to look at the final state of
policy, especially I'm not sure if we want the re-exports left in there considering deprecation doesn't work.