Open aslilac opened 2 weeks ago
See https://github.com/trunk-rs/trunk/issues/849#issuecomment-2283197282.
In your index.html
you need to tell Trunk where to look for Cargo.toml
.
huh, interesting. I would've really expected this to be configurable from Trunk.toml. it feels really unintuitive to configure something like this inside the index.html, imho. kinda like a Box<Box<ThingIWantToConfigure>>
.
I agree, it could be more intuitive. On the other side, trunk
considers the index.html
and or Trunk.toml
the authoritative source of information. Cargo is "only" a sub-task.
If you have any ideas how to improve that, that would be great.
as a fix for this specific issue, I think it'd be nice if Trunk checked for Cargo.toml..
..which would fix my case and other similar ones without any additional configuration
Sounds reasonable. Could you come up with a PR?
if you could point me at what files I should look in I might be able to work on it tonight :)
Sorry for the late response. This could/should/might be a good introduction: https://github.com/trunk-rs/trunk/blob/14b972f7369cf4e9d1b098e3afb4bc0e0ecd54d9/src/config/mod.rs#L1-L60
Here is the code for loading the configuration: https://github.com/trunk-rs/trunk/blob/14b972f7369cf4e9d1b098e3afb4bc0e0ecd54d9/src/config/models/mod.rs#L119-L148
I would like my index.html to live in the src/ directory, because I consider it to be part of my source code. Trunk unfortunately doesn't seem to handle this well.
...results in Trunk saying...
...even though the Cargo.toml and src/main.rs files are unmoved.
I poked around the trunk repo a bit to see if I could figure out a fix, but got lost pretty quickly. :(