mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.3k stars 1.52k forks source link

warn when (sub)project overwrites devenv #13131

Open pobrn opened 3 weeks ago

pobrn commented 3 weeks ago

I think it would be useful to get a warning (abort?) when subprojects/top-level project overwrite the same variable in the devenv.

For example, consider that two projects both have gstreamer plugins, naturally, both could set GST_PLUGIN_PATH, however, this causes only the value set in the last devenv to be applied. I think such a situation warrants at least a warning.

tristan957 commented 3 weeks ago

cc @xclaesse

dcbaker commented 3 weeks ago

I really wonder if we shouldn't treat subprojects setting devenv as being combined with the super project?

pobrn commented 3 weeks ago

I really wonder if we shouldn't treat subprojects setting devenv as being combined with the super project?

Could you please elaborate what you mean?

dcbaker commented 3 weeks ago

The more I attempt to write this out, the more I feel like this isn't going to work.

I think yeah, if you have a case where a subprojects overwrites rather than appends to a devenv variable you should get a warning, possibly a fatal one.