Repository navigation
feat: surface non-fatal warnings in check/generate/build - #53
Merged
Merged
Conversation
Bumps the comline-core + comline-codegen + comline-codegen-rust + comline-codegen-typescript pins to the end of the cascade needed for core#80's new ProjectContext::rendered_warnings() (deprecation-usage warnings, the first non-fatal diagnostic in the toolchain). check, generate, and build each print any accumulated warnings via ui::warn after a successful compile, before their own success message. Verified end-to-end against a scratch project with a @deprecated struct: all three commands render the warning (code, span, context) and exit 0 - confirming a warning genuinely doesn't fail the build.
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.
Summary
Last step of the cascade for core#80's deprecation-usage warnings. Depends on generation#41, comline-rust#31 + comline-rust#32, and comline-typescript#26 - all must merge first, in that order.
comline-core/comline-codegen/comline-codegen-rust/comline-codegen-typescriptto the cascade's final revs.check,generate, andbuildeach call the newProjectContext::rendered_warnings()and print any withui::warn, after a successful compile and before their own success message.This is the piece that makes a
@deprecatedstruct's usage visible from the terminal, not just the editor (language-server#48 already handles that side).Test plan
cargo test --all-features: all green (57 + 17, 0 failures) - this also incidentally caught and fixed an unrelated pre-existing bug once pointed at comline-rust's real merged history (comline-rust#32).cargo clippy --all-targets --all-features: clean.@deprecated = "use NewAuthor instead"on a referenced struct:check,generate, andbuildall render the warning (codevalidation::deprecated-type-usage, correct span/context) and exit 0 - confirmed a warning genuinely doesn't fail the build. A project with nothing deprecated prints nothing extra.