Skip to content

Commit 24110c5

Browse files
committed
bazel: procedure to handle OpenROAD breaking changes to ORFS
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 13b29fb commit 24110c5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Handling breaking changes between OpenROAD and ORFS
2+
3+
ORFS occasionally requires an update when OpenROAD has changed in some breaking way(such as when retiring a feature), but it is not common.
4+
5+
Normally a new feature is added to OpenROAD, then ORFS afterwards can be updated to use the new feature, or if ORFS has a breaking change for bazel-orfs, ORFS and bazel-orfs can be updated together in OpenROAD.
6+
7+
## Add interim conditional code to ORFS
8+
9+
One way to handle this is to add conditional code to ORFS and clean up the conditional code when it is no longer needed.
10+
11+
```tcl
12+
try {
13+
new_command -option value
14+
} trap {ANY} {e} {
15+
puts "new_command failed, falling back to old_command"
16+
old_command -option value
17+
}
18+
```
19+
20+
## Publish a Docker image with the changes
21+
22+
To update MODULE.bazel to point to a new ORFS docker image and bazel-orfs in OpenROAD, run [bazelisk run //bazel-orfs:bump](../../test/orfs/README.md#updating-orfs-and-bazel-orfs), then use `git add -p .` to pick what you want to commit.
23+
24+
Then, to create an OpenROAD PR which uses an interim ORFS Docker image:
25+
26+
1. publish a docker image of ORFS with the changes and the old broken OpenROAD, but don't update ORFS master. OpenROAD uses the ORFS docker image, with the bazel compiled OpenROAD
27+
2. point MODULE.bazel to this docker image
28+
3. create a PR for OpenROAD. This PR will run with HEAD from OpenROAD and the ORFS image you published in 1.
29+
4. Upgrade the OpenROAD submodule in ORFS and publish a new Docker image
30+
5. Run `bazelisk run //bazel-orfs:bump` again

0 commit comments

Comments
 (0)