Closed Mueller-Peter-ATZ closed 1 year ago
Can you explain what you expect to get a response here: We instruct cargo to recompile the crate if that environment variable changes because that changes how the crate is compiled. Cargo is responsible for monitoring of changed variable values and recompile the crate if necessary. The crate itself does not have control about that. So from our point of view that's either a configuration issue in your environment (variable changes because you compile the crate from somewhere else, e.g. rust-analyzer) or an issue in cargo (failed to recognize that the variable did not change, although I personally would consider that unlikely).
I've just seen, that this crate causes the recompiling. I've also seen it checks the variable but I could not find out why it assumes it changed. I started a project with diesel and mysql and i always recompiles a lot of thinks which is time consuming. So asking here was the best way I#ve seen so far.
I really use rust-analyzer but how does it affect the assumption? Can I change something in its settings or do something else in the enviroment to stabilize the detection?
Thanks in advance for your help
I can understand that this is frustrating, there is just nothing we can do to help you there.
I've also seen it checks the variable but I could not find out why it assumes it changed.
Such variable changes are highly dependent on your environment. It's impossible to know what's causing them without access to that environment. I personally would start with the following assumption here: Cargo is right and that environment variable somehow changes. Find out why this might be the case. Maybe try the following steps:
cargo c
there several times. If it doesn't rebuild it's likely caused by your editor.PKG_CONFIG_PATH
for that addon as wellI'm now closing this issue as that's not an actual bug in mysqlclient-sys.
OS: Windows 10 IDE: Visual Studio Code
with
cargo c --verbose
I get this entry:Dirty mysqlclient-sys v0.2.5: the env variable PKG_CONFIG_PATH changed
Compiling mysqlclient-sys v0.2.5
On the console (bash, integrated in VSC) I checked:
$ echo $PKG_CONFIG_PATH
/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
But the variable never reallay has changedExpected Behavior: The libraray should only compile once and after that only if some of the dependencies are dirty.