Commit Graph

420 Commits

Author SHA1 Message Date
Matt Liberty
d43d716d9b Merge pull request #9811 from alokkumardalei-wq/feature/bazelisk-run-tidy
Bazel: Add unified hermetic:tidy target for workspace formatting
2026-04-15 15:23:46 +00:00
Matt Liberty
2939447bf1 Merge pull request #9649 from alokkumardalei-wq/docs_depenency
docs: Add DependencyInstaller.sh functionalities(-local and -prefix) to Build.md
2026-04-15 15:17:19 +00:00
Øyvind Harboe
cca60223ed Update docs/user/Bazel.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-04-14 18:17:30 +02:00
Øyvind Harboe
7d371a36ee bazel: add top-level aliases for install and tarfile
The install and tarfile targets were moved to //packaging/ to isolate
@rules_pkg loads from downstream consumers, but this broke the
user-facing //:install and //:tarfile targets. Add alias() rules at
the top level to restore the public API while keeping the implementation
in the packaging/ subdirectory.

Update documentation to use //:install and //:tarfile. Also fix
docs/user/Bazel.md which incorrectly listed rules_shell as a
dev_dependency (it is loaded in the root BUILD.bazel).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-04-14 18:12:35 +02:00
alokkumardalei-wq
8d652ae302 bazel: add buildifier lint/fmt/tidy targets for .bazel files
Implements #9858 (#8495). Adds three new targets mirroring the TCL
lint pattern:

  //:lint_bzl_test  - buildifier -mode=check -lint=warn  (lint check)
  //:fmt_bzl_test   - buildifier -mode=check -lint=off   (format check)
  //:tidy_bzl       - buildifier -mode=fix -lint=fix     (auto-fix)

Wires lint_bzl_test and fmt_bzl_test into //:lint_test, and
bzl_tidy.sh + bzl_lint_test.sh into //:fix_lint. Adds
buildifier_prebuilt 6.4.0 as a dev_dependency in MODULE.bazel.

Uses git ls-files for file discovery, which automatically skips
submodule paths (src/sta, third-party/abc). Explicit -mode=check
flags override the repo-root .buildifier.json default (mode: fix),
ensuring test targets remain read-only.

Updates docs/contrib/LintTargets.md: moves buildifier from "Planned
additions" to "Available targets".

Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 11:30:47 +05:30
alokkumardalei-wq
5cd31076b7 docs: Update dependency install instructions to use setup.sh
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 09:19:02 +05:30
alokkumardalei-wq
8eecd0690c fix cmakeOptions eval bug and add missing help flag
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 09:09:27 +05:30
alokkumardalei-wq
f0795a1019 docs: Add DependencyInstaller help to Build.md and support -local/-prefix in Build.sh
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 09:07:45 +05:30
Sahil Jaiswal
218e898f8e build: Improve macOS build and dependency installation
ref #9895

- Add macOS venv setup documentation
- Improve Build.sh with better package validation and env config
- Update DependencyInstaller.sh for macOS (threads, icu4c, tcl-tk@8)
- Use pip instead of pipx

Signed-off-by: Sahil Jaiswal <jaiswalsahil7741@gmail.com>
2026-04-12 15:51:46 +05:30
Matt Liberty
31e3777aaa Merge pull request #10030 from The-OpenROAD-Project-staging/secure-upload-agents-md
Add AGENTS.md for cross-tool AI agent guidance
2026-04-04 00:12:26 +00:00
Jaehyun Kim
927e24d9ef Apply gemini review feedback
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-04-02 11:34:18 +09:00
Jaehyun Kim
3f57a66427 Apply review feedbacks
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-04-02 11:14:57 +09:00
Jaehyun Kim
03ba68b735 Add AGENTS.md and AI agent sub-guides for cross-tool support
Add project-specific AI agent guidance files that work across
Claude Code, Codex, and Gemini CLI. Includes 5 critical rules
(sta/ protection, clang-format exclusions, DCO compliance,
submodule hygiene, upstream bug tracing) and 4 sub-guides
for build, testing, CI, and coding patterns.

Relocate triage-issue skill to .agents/skills/ (cross-tool)
with .claude/skills symlink for backwards compatibility.
Add .gemini/commands/triage-issue.toml for Gemini CLI support.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
2026-04-01 23:33:42 +09:00
Vitor Bandeira
4558a30fb7 Merge pull request #10008 from The-OpenROAD-Project-staging/bazel-docs
bazel:   fix Bazel target paths in install script and docs
2026-03-31 18:57:44 -03:00
Øyvind Harboe
0f5ef70df0 docs: fix stage list formatting in Bazel.md per review
Remove leading underscore from synth and use comma separators
for the list of ORFS stages, as suggested in PR #10011 review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-31 23:12:35 +02:00
Øyvind Harboe
b2b9dbdfb0 docs: update bazel-orfs _deps targets to //:deps wrapper
bazel-orfs replaced per-stage _deps targets with a single //:deps
wrapper using --output_groups=deps. Update documentation to reflect
the new syntax while keeping tmp/ directory paths unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-31 23:12:32 +02:00
Vitor Bandeira
2464c8cb54 bazel: fix Bazel target paths in install script and docs
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
2026-03-31 18:06:38 +00:00
Matt Liberty
c4ad7f7b41 Merge pull request #9997 from The-OpenROAD-Project-staging/new-oses-docs
Update supported OS: drop Debian 11, add Debian 13 and Ubuntu 26.04
2026-03-30 21:32:31 +00:00
Matt Liberty
08138fb64f Merge pull request #9866 from sparsh-karna/odb/grammar-railroad-diagrams
odb: add LEFDEF grammar railroad diagram documentation
2026-03-30 21:11:11 +00:00
Joao Luis Sombrio
4935347193 Update supported OS docs: drop Debian 11, add Debian 13 and Ubuntu 26.04
Remove Debian 11 from the supported OS table and LTO workaround
since it is no longer supported in CI. Add Debian 13 and Ubuntu 26.04
as newly supported platforms.

Signed-off-by: Joao Luis Sombrio <sombrio@sombrasoft.dev>
2026-03-30 13:44:57 -03:00
Matt Liberty
60ede5632e Merge pull request #9900 from luarss/topic/rectify-doc-ok
Rectify `man_tcl_check` counts + Cleanups
2026-03-26 12:51:27 +00:00
Øyvind Harboe
8b75614c92 bazel: group dev deps, combine register_toolchains, docs split required vs suggested
Address PR #9827 review feedback:
- Group all dev_dependency bazel_dep entries into a separate section
  in MODULE.bazel for easier reasoning (hzeller)
- Combine two register_toolchains calls into one (gemini-code-assist)
- Split downstream MODULE.bazel docs into required and suggested
  sections, making toolchains_llvm optional (hzeller)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-24 11:44:34 +01:00
Jack Luar
4322eb35c6 add skip_markers to fix md_roff_compat
- context: `checker:skip` was added as invisble md markers to avoid odb functions being detected in `man_tcl_check`
- adding `skip_markers` enable all Tcl blocks enclosed in md_roff eligible functions to be detected.

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
2026-03-24 08:28:22 +00:00
Jack Luar
414f302d2e add actual man_tcl_check fixes
- add readme.md override mechanism (checker:skip) which is invisible in markdown.
- add missing tcl `define_cmd_args`
- fix typos

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
2026-03-24 05:07:28 +00:00
Øyvind Harboe
47cb9b075c Merge remote-tracking branch 'origin/master' into HEAD 2026-03-24 01:16:19 +01:00
Matt Liberty
5153e1bf31 Merge pull request #9733 from Pinata-Consulting/bazel-fast-doc-tests
Bazel fast doc tests
2026-03-23 23:17:32 +00:00
Øyvind Harboe
0818868bfb Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	MODULE.bazel.lock
2026-03-23 23:21:46 +01:00
Matt Liberty
7589698eb7 Merge pull request #9880 from hzeller/feature-20260323-shebang-bash
Fix uses of `/bin/bash` to use `/usr/bin/env bash` instead.
2026-03-23 15:35:40 +00:00
Matt Liberty
7cbe62ead0 Merge pull request #9873 from rovinski/master
ram: Create initial README.md
2026-03-23 14:19:10 +00:00
Henner Zeller
c10380196d Fix uses of /bin/bash to use /usr/bin/env bash instead.
The only Posix compatible way to call bash is via `/usr/bin/env`
as bash might be installed in different locations on the system.
`/bin/bash` is not a Posix-required location for that binary
(only `/bin/sh` is).

Use `set -o noglob` instead of `bash -f` for improved readability.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-23 02:57:02 -07:00
Austin Rovinski
4aab880300 ram: Create initial README.md
Signed-off-by: Austin Rovinski <rovinski@users.noreply.github.com>
2026-03-23 02:43:45 -04:00
Sparsh Karna
220c00bbab odb: add LEF/DEF grammar railroad diagram docs
Add SVG railroad diagrams generated directly from lef.y and def.y,
a Python script to regenerate them, Markdown documentation that
embeds the diagrams, and a GitHub Actions workflow that opens a PR
whenever a grammar file changes.

Files added:
- src/odb/doc/generate_railroad_diagrams.py  — converts .y → EBNF →
  individual SVG files using ebnf-convert and rr (downloaded from
  Maven Central on first use; not committed).
- src/odb/doc/images/lef/  — 246 SVGs generated from lef.y
- src/odb/doc/images/def/  — 276 SVGs generated from def.y
- src/odb/doc/LEF_Grammar.md  — documentation with embedded diagrams
- src/odb/doc/DEF_Grammar.md  — documentation with embedded diagrams
- src/odb/doc/.gitignore  — excludes tools/ and intermediate files
- .github/workflows/github-actions-update-grammar-railroad-diagrams.yml
  — auto-regenerates and opens a PR on grammar changes

Resolves #2488

Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
2026-03-21 16:16:28 +05:30
Øyvind Harboe
183689f85d fix: make fix_lint run tclint after tclfmt (POLA)
fix_lint was an alias for tidy_tcl (tclfmt only), so developers
who ran it before pushing were still surprised by tclint CI
failures like line-length.

Replace the alias with a script that delegates to tcl_tidy.sh
and tcl_lint_test.sh (DRY), shows git status, and exits with
a clear error if lint violations remain unfixed.

Update docs with POLA rationale and naming convention for
umbrella and per-language targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 16:59:23 +01:00
Øyvind Harboe
8602ede150 Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	BUILD.bazel
2026-03-20 16:29:16 +01:00
Øyvind Harboe
90a2c33d2c fix: relax man_tcl_check readme assertion to allow cross-module docs
Some modules document commands from other modules in their README
(e.g., ppl documents odb pin constraint commands). Change the test
from assertEqual(p, r) to assertLessEqual(h, r), which still catches
undocumented commands but allows README to have extra cross-module
documentation. Revert README changes that broke readme_msgs_check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 14:40:26 +01:00
Øyvind Harboe
b0c08de7d5 fix: accumulate counts across multiple tcl files per module
The help/proc counting used = instead of +=, so modules with
multiple .tcl files (rcx, dbSta) only kept the last file's counts.
Fixes rcx mismatch (h=4 vs r=17 → h=17, p=17, r=17).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 14:25:05 +01:00
Øyvind Harboe
e35fd3aea3 test: add unit tests for extract_help and extract_proc
Add unittest coverage for the extract_utils parsing functions to
prevent regressions in the define_cmd_args matching logic:
- basic command, multiline args, nested braces, empty args
- checker off filtering (various spacing)
- proc_redirect counted, does not consume next command
- orphan define_cmd_args without proc not counted

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 14:16:51 +01:00
Øyvind Harboe
20b475f45a fix: rewrite extract_help to match define_cmd_args independently
The old regex (.*?)proc\s spanned across multiple define_cmd_args
blocks when sta::proc_redirect was used between commands, causing
mismatched counts. Match each define_cmd_args by tracking brace
depth and verify a matching proc/proc_redirect exists.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 14:14:52 +01:00
Øyvind Harboe
e3eddad562 bazel: convert man_tcl_check to unittest py_test
Convert man_tcl_check scripts from ad-hoc print-and-diff-against-.ok
to proper unittest.TestCase with assertEqual. Use Bazel py_test
instead of doc_check_test so the test exit code propagates directly.

- Add py_library for extract_utils in docs/src/scripts/BUILD
- Derive module name from __file__ instead of os.getcwd()
- Fix odb include path in all scripts (swig/tcl/odb.tcl)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 13:52:17 +01:00
Øyvind Harboe
33cef2c68b test: replace man_tcl_check pass/fail print with assert
The man_tcl_check tests printed "Command counts do not match" but
exited 0, allowing .ok files to bake in mismatches as expected output.
Replace the if/else with an assert so count mismatches are real
failures. Remove .ok files since assertions are the test now.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 13:45:28 +01:00
Øyvind Harboe
a6fbd74b8a Merge origin/master into bazel-fast-doc-tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 13:43:49 +01:00
Matt Liberty
2da3e5bf39 Merge pull request #9734 from Pinata-Consulting/linting
Some checks failed
Automatically sync branch from upstream. / Automatic sync 'master' from The-OpenROAD-Project/OpenROAD (push) Has been cancelled
Lint Python / Black (push) Has been cancelled
Lint Bazel / Buildifier format (push) Has been cancelled
Lint Bazel / Buildifier lint (push) Has been cancelled
Check That ODB Files Are Generated / Are-Odb-Files-Generated (push) Has been cancelled
Format Code with pre commit trigger / Clang-Format (push) Has been cancelled
Lint Tcl code / Tclint (push) Has been cancelled
Build on macOS / Mac-Build (push) Has been cancelled
Scan Code with pre commit trigger / Security-Scan (push) Has been cancelled
Linting
2026-03-20 00:34:33 +00:00
Øyvind Harboe
62b788ce9c bazel: replace DOC_TEST_MODULES list with tag-based discovery
Remove the centralized DOC_TEST_MODULES list and doc_test test_suite
from root BUILD.bazel. Each doc_check_test already adds the
"doc_check" tag, so use --test_tag_filters=doc_check //src/... instead.

This avoids the list getting out of sync when modules are added.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-19 13:58:04 +01:00
Øyvind Harboe
934733383a docs: document using OpenROAD as a dependency from another project
Add a section to Bazel.md covering the public API surface
(//:openroad and //:openroad_py), the minimal MODULE.bazel
boilerplate downstream consumers need (qt-bazel git_override,
toolchains_llvm configuration), and which deps are dev_dependency.

Signed-off-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-19 12:13:52 +01:00
Øyvind Harboe
f9a68f55ea docs: remove redundant tclint settings from docs
The settings are already visible in tclint.toml itself (DRY),
and the listed exclusions were already stale.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-18 23:59:37 +01:00
Øyvind Harboe
979634dd6b docs: update doc_check_tests.md for macro-based workflow
Update documentation to reflect the new filegroup + messages_txt macro
approach and the automatic doc_check tag for test discovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-17 19:46:09 +01:00
Øyvind Harboe
ebd2ac7c88 Merge remote-tracking branch 'origin/master' into bazel-fast-doc-tests
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

# Conflicts:
#	etc/BUILD
#	src/dft/test/BUILD
#	src/drt/test/BUILD
#	src/mpl/test/BUILD
#	src/odb/test/BUILD
#	src/rmp/test/BUILD
#	src/rsz/test/BUILD
#	src/utl/test/BUILD
2026-03-17 19:32:01 +01:00
Øyvind Harboe
ba764a22fc Merge remote-tracking branch 'origin/master' into HEAD 2026-03-13 15:33:25 +01:00
Øyvind Harboe
89c3c365d6 bazel: use verb-first naming for lint targets
Rename tcl_lint_test → lint_tcl_test, tcl_fmt_test → fmt_tcl_test,
tcl_tidy → tidy_tcl for consistent verb-first naming with _test suffix
per Bazel convention. Update docs to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-13 15:32:58 +01:00
Øyvind Harboe
f5d566698e bazel: address PR #9734 review comments
- Rename //:lint to //:fix_lint to clarify it modifies files (gadfort)
- Replace duplicated sh_binary with alias(actual = ":tcl_tidy") (gemini)
- Add BUILD_WORKSPACE_DIRECTORY fallback in tcl_tidy.sh (gemini)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-13 15:32:58 +01:00