-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Hard coded build script means ineffective watches when the file is in a non standard location #205
Comments
I'll have a look. In the meantime, do we agree that you can simply add |
I haven't tried it yet, but possibly yes. Is that value additive? Or will I also have to list of everything else that will affect the build? Even so it's still unexpected that the things Cargo knows about the source layout isn't taken into account. |
It's additive. And you can use
Last time I checked, there was no good solution in the rust ecosystem for getting the information regarding the project's metadata. As I'd rather not maintain that part myself I use cargo-metadata whose design isn't great. I'll have a look regarding the |
Fair enough, and thanks for the info. Before I opened this issue I had a quick look at the source to see if this was something I could easily fix, but since I didn't see if/where the manifest was being read at all it wasn't obvious how to fix this.
Yes, this is an ongoing gripe of mine with Cargo. By itself it's a pretty capable tool and I grant it has decent UX. But it does not play nice with other build systems or tooling at all. Even though bacon isn't a build system it shares this issue of having to guess/reproduce what sources go into a build without much from Cargo to go on. (And thanks for |
The location of
build.rs
to watch seems to be hard coded as the Cargo default:bacon/src/mission.rs
Line 17 in 27060c8
This location is, however, configurable. I do so in most of my projects to group build tooling out of the way of the top level directory when possible:
This location is not watched, hence changes to the file do not trigger updates in
bacon
.I would suggest the Cargo manifest actually be read and the value of
build
(if set), and fall back to the default if it is not set. There might even be a way to query the active value out of Cargo, but I don't know what it is. Somewhat unhelpfullycargo read-manifest
buries the relevant info a bit. For example on my git-warp-time project that relocates the build script, the info ends up here:The text was updated successfully, but these errors were encountered: