-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add minimum supported axoupdater check (library) #1432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved but some changes to make
Pushed up a version with some changes. I realized that since we were already iterating over direct packages in the workspace and not transitive dependencies (and since Gankra's suggestion was to ignore unexpected packages), we could do this a little easier by putting that dependency info on each package rather than on the workspace. Makes it easier to decide if we need to care about that axoupdater version per-package. We don't - currently - know of any projects that actually transitively depend on axoupdater, I suppose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments, mostly focused on: if we error on a transitive dep, we need to give the user more info. also makes a suggestion that we link to a docs page on this with the error.
With the first clause in the previous verison, we'd end up reporting that axoupdater always came from the package itself instead of tracking the dependency it really came by. Tracking only the subdeps works for both direct and transitive dependencies.
Fixed a bug that caused us to report the wrong transitive dep version. Works fine for both direct and transitive deps now. Direct:
Transitive:
|
This avoids miette linebreaking the URL, which should make it easier to copy/paste or cmd+click.
This adds a check when building Rust software which uses axoupdater as a library. If the user is using a version older than what this version of cargo-dist was for, it emits a warning at buildtime. I tested it on cargo-dist itself by bumping the const to something that doesn't exist, and confirmed it works:
To support this, I added support in axoproject for detecting if axoupdater is present and, if it is, its version is recorded. I briefly considered tracking the full dep tree in the axoproject info but that seemed like overkill.
Fixes #1392.