FaultyRAM / windres-rs

Compiles Windows resource files (.rc) into a Rust program.
Apache License 2.0
21 stars 4 forks source link

Resource information is incorrectly reused for sibling crates #10

Closed mvd-ows closed 6 years ago

mvd-ows commented 6 years ago

As an example, let's say we have two binary crates, crate a and crate b, where the first one has resource information and the seconds one doesn't.

crate a is built first and the resulting exe correctly includes the intended resource information. However, when crate b is built the environment seems to still be configured to include the resource file that was specified for crate a.

The unwanted result is that crate b reuses the resource information that was specified for crate a.

FaultyRAM commented 6 years ago

Could you post an example of this in action? It's hard to tell what "having two binary crates" means here.

mvd-ows commented 6 years ago

Thanks for the quick reply!

I've spent some time trying to reproduce this issue in a new project, and failed at doing so. I believed the issue to be present when using a Rust workspace, with crate a and crate b being just two independent crates in the workspace.

I went back to the original code to examine it and the artifacts produced from building said code. I then discovered that there's no issue at all. The reason I was confused is because one of the crates produces several binaries which have very little in common. I then falsely assumed that they came from different crates.

TLDR; The resource information does not "jump between" crates. It was all a misunderstanding :-)