Conversation
added 9 commits
November 29, 2022 10:54
Fully functional migrate from ctor to linkme. Current status: - all tests and examples passing/working on OS X - new flexibility introduced for processing plugins (including modifying plugin selection, ordering of plugins, etc..) - no risk of UB due to ctor mis-use One drawback: all plugin crates (including scaffold) must include the linkme crate. This wasn't a requirement with ctor.
lint found issues that it couldn't find with the ctor approach. Fix them.
Windows test failed but other platforms passed, which is odd. I feel like they should all fail or pass. Anyway, try to trigger the load of plugins from the test_harness and see if that changes behaviour. Also, fix the warning about unused stuff in the axum_factory tests.
Still failing on windows. Revert the change to test_harness and cfg out the test on windows for now...
We don't really need a HashMap. There are very few plugins and most of the time we are just iterating over them repeatedly. This change exposes an iterator for plugins. Also: update linkme to 0.3.6 to see if Windows is fixed.
commented out bits mainly...
Using a profile for testing which shouldn't be in the PR.
This comment has been minimized.
This comment has been minimized.
BrynCooke
approved these changes
Dec 1, 2022
bnjjj
approved these changes
Dec 1, 2022
SimonSapin
reviewed
Dec 2, 2022
added 2 commits
December 5, 2022 08:29
Since the feature is undocumented, I'm a bit nervous, but let's do it because the worst that can happen is that we need to make the change in the future.
SimonSapin
approved these changes
Dec 5, 2022
Contributor
SimonSapin
left a comment
There was a problem hiding this comment.
(Note that ctor is still in the dependency graph, through proteus / typetag / inventory)
SimonSapin
approved these changes
Dec 6, 2022
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.
ctor is completely replaced with linkme.
pros:
cons:
all crates must includelinkme 0.3.6linkmeetc...This gives us a more stable foundation for plugin loading/registration and we could (in future, not this PR) add mechanisms to exclude plugins or re-order them or ... The main benefit is in reducing the risk of UB creeping in to the codebase in future via plugin registration.
I believe the change is fundamentally a compatible change.
, but it may require plugins generated usingscaffoldto be modified (to include thelinkmecrate) so that they continue to compile