You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One cannot retrieve git information if, for some reason, you are stuck with a non-regular clone. In my case, I have access to the full repository but since I want to build a subdirectory (monorepo) in docker, I lose my git context (which is completely reasonable).
In this case, I want to be able to provide the "lost" information manually, e.g. via an environment variable or by calling the write_variable macro myself in build.rs. This seems like a feature which would help alleviate the OP's issue as well.
I'm therefore suggesting two distinct features:
The ability to include certain environment variables in built.rs. This could be done by adding variables with a BUILT_ prefix` .
The ability to add or replace variables from build.rs. This could e.g. take the form of a macro set_variable!("GIT_COMMIT_HASH_SHORT", "Option<&str>", "abc1234").
If 2. is implemented, 1. probably isn't necessary as developers could easily implement the functionality themselves.
One cannot retrieve git information if, for some reason, you are stuck with a non-regular clone. In my case, I have access to the full repository but since I want to build a subdirectory (monorepo) in docker, I lose my git context (which is completely reasonable).
In this case, I want to be able to provide the "lost" information manually, e.g. via an environment variable or by calling the
write_variable
macro myself inbuild.rs
. This seems like a feature which would help alleviate the OP's issue as well.I'm therefore suggesting two distinct features:
built.rs
. This could be done by adding variables with aBUILT_
prefix` .build.rs
. This could e.g. take the form of a macroset_variable!("GIT_COMMIT_HASH_SHORT", "Option<&str>", "abc1234")
.If 2. is implemented, 1. probably isn't necessary as developers could easily implement the functionality themselves.
Originally posted by @FelixZY in #38 (comment)
The text was updated successfully, but these errors were encountered: