-
Notifications
You must be signed in to change notification settings - Fork 6
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
Building triggers all dependencies to be rebuilt when building from the terminal #65
Comments
After some investigation, I'm pretty sure this is caused by the inclusion of
To mitigate this |
It's strange, I don't use JSON output in cargo-build, but I see the recompilation when switching between Atom and a terminal. I tried switching setting and unsetting various environment variables, but to no avail. So I think there's something else that causes such behaviour. According to your description, you only used a terminal. What happens if you switch off JSON output in build-cargo and try switching between Atom and the terminal while recompiling your project? |
It looks like it's not just |
Yes, But anyway, it's the |
And you're right, after |
An alternative would be to do |
Fun fact, AtomLinter/linter-rust#77 is seeing this same issue, and that issue point out that solving this is blocked by rust-lang/cargo#2982. |
It's not clear to me from the Cargo issue discussion that fixing it will prevent calling Regarding to calling
will add |
In saying that this is blocked on rust-lang/cargo#2982 I figured that once cargo directly supported JSON output it could taught to treat In the meantime, I'll give the custom build command a shot. If I can get that working it'll at least cover my use-case for the time being. |
it's in the latest nightly now. The only issue left is to figure out whether to simply break all old nightlies and stables or to add a dropdown menu to choose the variant to use ( |
There's already some code to check the version number of rustc to see if JSON output is supported, could the same be done to see if the cargo version supports |
great idea! |
I have the same problem due to |
we can simply pass this flag to cargo instead of rustc |
When I use atom-build-cargo to build my project within Atom it rebuilds all dependencies the first time, regardless of whether I've previous built from the terminal. After building from Atom, the next time I build from the terminal all dependencies get rebuilt. When I then go back to Atom and build all dependencies are rebuilt again. If I build multiple times in a row from just the terminal or just from Atom dependencies are only rebuilt the first time and then never again (unless I touch one of the files in a dependency's crate).
It would appear that building in Atom invalidates the build artifacts from terminal builds, and vice versa.
Expected Behavior
Builds from within Atom and builds from the terminal work with the same asset cache, so building dependencies from one builds for the other. Or, at the very least, building from one does not cause all dependencies to be rebuilt for the other.
Platform Notes
The text was updated successfully, but these errors were encountered: