-
Notifications
You must be signed in to change notification settings - Fork 25
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
Updating an existing dylint lint #1264
Comments
Hi, @newcomertv. Thanks for your kind words, and thanks for providing the link to the repo. The "magic trick" is this: cargo dylint upgrade . This will update your project's I tried this on you project and ran into an issue with I removed this line and everything seemed to build: https://github.com/newcomertv/parameter-prefix-dylint-rs/blob/aa41c9481cbd3d01fd2dc877eec6a1f7f094b650/src/lib.rs#L119 I would need to study that PR more to know if this is the "right" fix, though. Please let me know if I have misunderstood what you were asking about. |
Thanks for the response! After running cargo dylint upgrade it updated the toolchain to the nightly from the 25th of July. (4 days ago) Attempting to build failed due to being unable to find the extern crates. After a closer look the rust-toolchain for dylint is set to "nightly" After changing the rust-toolchain to also reflect "nightly" everything builds. Running: 'cargo dylint list --path .' yields the following:
|
My understanding is its supposed to work with the specific date as well. With dylint being supposed to take whatever nightly my lint specifies. This doesn't work so I try removing the date however dylint expects a date and is unable to tell me that it built without encoding the nightly version in the library version. EDIT: |
I'm closing the issue since the original question has been answered. Thanks for the help and the great library |
This is actually based on what Clippy uses: https://github.com/rust-lang/rust-clippy/blob/f7db8952e611e359ce3fb04c85d2ffb92036a55c/rust-toolchain#L2 Since
At a high level, that is correct. But how was your lint specifying the date? In other words, what date were you expecting Dylint to find that it was not? The way Dylint normally finds the date is from the filename (as I think you figured out). Also, I noticed that the repo does not include a dylint/examples/general/.cargo/config.toml Lines 4 to 5 in 08992ae
That will cause a file with the toolchain date to be generated automatically. |
Hey,
The project is awesome and really helped me out in a pinch when I needed to write a quick and dirty lint.
After abandoning my quick lint and coming back to give it some much needed love I came across this issue:
Based on the documentation I wasn't able how to figure out how to update an existing dylint lint.
My steps to reproduce are probably pretty vague since I originally wrote the lint a couple months ago..
Steps I did:
Create a new lint using dylint new ..
Edit
Use a bunch
Update toolchains
Use a bunch
Edit
cargo build
-> lint doesn't update, uses old description and way of operating (the old .so)
run cargo clean
library not found
cargo build
library not found
cargo dylint --lib-path path/to/release/lint.so
invalid filename, does not respect the format
At this point I'm expecting there to be a magic trick how to re-register a dylint lint without needing to run cargo dylint new
NOTE: I have a rust-toolchain.toml
Link to project: https://github.com/newcomertv/parameter-prefix-dylint-rs
The text was updated successfully, but these errors were encountered: