Open j3parker opened 4 years ago
I did some digging on MacOS and this is what I found:
We're going to need to paths mapped (either with /pathmap:{x}={y},{a}={b}
or with two /pathmap
args) to get full reproducibility.
WORKSPACE
to something stable. This gets deterministic PDBs, which is good but not mission-critical (for D2L). We mightttt be able to figure that out in csharp_repositories
but then that also might not work the same for remote builds. Needs investigation.So we still want to have a wrapper to do the injections as far as I can tell, but it's still a bit of work to figure out what they should be.
This is at least required for PDBs, as documented here but I also noticed absolute paths in our DLLs.
We can't trivially do this in Bazel. We need to figure out all of our command line flags during the analysis phase, which doesn't (afaik) know where the build will actually execute (it could be on a remote machine, and analysis also gets cached) so we can't know what paths to map.
We could wrap the compiler to inject this argument at runtime.
We're talking about adding a wrapper already in #12, but I have some concerns. That thing itself needs to be compiled, and probably also needs
pathmap
to be deterministic, so we've got an even worse chicken and egg problem. Maybe when we compile the wrapper we need a small C program to inject this argument?I think we need to be flexible and experiment to find out what will work best. The experiments should look at how local and remote caching behave.