OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

bazel - needs to show git describe in splash

Open gadfort opened this issue 8 months ago • 7 comments

Description

The CMake generates a useful version for use to use, which the bazel build should do as well. This allows for easy debug and if the log files are a concern it can already be disabled with -no_splash

Suggested Solution

No response

Additional Context

No response

gadfort avatar Apr 15 '25 00:04 gadfort

I disagree with this feature request: this breaks bazel hashes and would cause a re-run of all tests when it is not necessary, for instance, changing a git comment or modifying a comment in the OpenROAD source code.

oharboe avatar Apr 21 '25 06:04 oharboe

Changing a comment in the source code does not change the commit id unless you commit the change.

I think this is a useful feature. Knowing what version of the tool generated some result is often helpful.

maliberty avatar Apr 21 '25 15:04 maliberty

Changing a comment in the source code does not change the commit id unless you commit the change.

Yes: I want to avoid rebuilds/retests in this case, such as a no-op merge commit.

I think this is a useful feature. Knowing what version of the tool generated some result is often helpful.

Yes, but it needs to be done in a different way.

I am thinking a build.txt file that is only read in runtime so that bazel does not consider it a dependency.

This has to be a solved problem.

@hzeller Any experience on how to implement this without the downsides?

oharboe avatar Apr 21 '25 15:04 oharboe

You do it with the build tagging system --stamp I mentioned earlier. You just run --nostamp in everything except a special --config=release mode.

QuantamHD avatar Apr 21 '25 15:04 QuantamHD

Given that we don't do formal releases I'm not sure how helpful that is. If the CI has stamping on then developers will see no cache benefit. If the CI has it off then likely nobody will ever turn it on.

maliberty avatar Apr 21 '25 15:04 maliberty

Yes there are ways and I can take care of it when I have a minute (but next two weeks: no minutes left)

hzeller avatar Apr 21 '25 17:04 hzeller

@QuantamHD @hzeller do you have time to address this?

gadfort avatar Oct 03 '25 12:10 gadfort