Skip to content

Commit

Permalink
Merge pull request #2303 from hzeller/feature-20241217-file-cleanup
Browse files Browse the repository at this point in the history
Smallish cleanups here and there.
  • Loading branch information
hzeller authored Dec 18, 2024
2 parents 4f3b840 + 6622bfa commit 2f99cdc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .github/bin/check-potential-problems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,19 @@ if [ $? -eq 0 ]; then
EXIT_CODE=1
fi

find verible -name "*-test.cc" -o -name "*-test.sh" | grep test
if [ $? -eq 0 ]; then
echo "::error:: File naming-convention for tests is to end with _test; e.g. foo-bar.cc has test foo-bar_test.cc; similar with shell-script tests"
echo
EXIT_CODE=1
fi

# bazelbuild/rules_python is broken as it downloads a dynamically
# linked pre-built binary - This makes it _very_ platform specific.
# This should either compile Python from scratch or use the local system Python.
# So before rules_python() is added here, this needs to be fixed first upstream.
# https://github.com/bazelbuild/rules_python/issues/1211
grep rules_python WORKSPACE* MODULE.bazel
grep rules_python MODULE.bazel
if [ $? -eq 0 ]; then
echo "::error:: rules_python() breaks platform independence with shared libs."
echo
Expand Down
2 changes: 1 addition & 1 deletion .github/bin/generate-coverage-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ if [ ! -r "${COVERAGE_DATA}" ]; then
exit
fi

genhtml -o ${OUTPUT_DIR} ${COVERAGE_DATA}
genhtml --ignore-errors inconsistent -o ${OUTPUT_DIR} ${COVERAGE_DATA}
echo "Output in $(realpath ${OUTPUT_DIR}/index.html)"
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,16 @@ guide and the [development resources](./doc/development.md).

Verible's code base is written in C++.

To build, you need the [bazel] (>= 5.0 and <= 7) build system and a C++17
compatible compiler (e.g. >= g++-10), as well as python3. Note, to build
Verible with bazel-7, so you need to add `--noenable_bzlmod` to every bazel
command. A lot of users of Verible have to work on pretty old installations,
To build, you need the [bazel] build system and a C++17
compatible compiler (e.g. >= g++-10), as well as python3.
A lot of users of Verible have to work on pretty old installations,
so we try to keep the requirements as minimal as possible.

Use your package manager to install the dependencies; on a system with
the nix package manager simply run `nix-shell` to get a build environment.

```bash
# Build all tools and libraries
# bazel 6/7/8
bazel build -c opt //...
```

Expand Down Expand Up @@ -240,7 +238,7 @@ If you prefer to build and install the binaries locally yourself:
```bash
bazel build -c opt :install-binaries

# install In your home directory
# Install in your home directory
.github/bin/simple-install.sh ~/bin

# For a system directory that requires root-access, call scfript with sudo.
Expand Down
6 changes: 6 additions & 0 deletions bazel/jsonhpp.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# JSON for Modern C++ https://github.com/nlohmann/json
#
# This file is not directly needed anymore, but left
# here for now for projects still using a WORKSPACE
# reference.
#
# Should probably be removed around mid 2025.

licenses(["unencumbered"]) # Public Domain or MIT

Expand Down
3 changes: 3 additions & 0 deletions doc/indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ indexing Bazel-based projects.
More information about indexing Bazel-based projects using Kythe
[here](https://github.com/kythe/kythe/tree/master/kythe/cxx/extractor#bazel-c-extractor).

Note, if you just want to locally edit the code, no need to index, just use
the compilation DB by calling `.github/bin/make-compilation-db.sh`

### Initializing Kythe

Download the latest Kythe release from https://github.com/kythe/kythe/releases
Expand Down
2 changes: 1 addition & 1 deletion verible/common/tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ filegroup(
sh_test_with_runfiles_lib(
name = "verible-transform-interactive_test",
size = "small",
srcs = ["verible-transform-interactive-test.sh"],
srcs = ["verible-transform-interactive_test.sh"],
args = [
"$(location :verible-transform-interactive)",
"$(location :verible-patch-tool)",
Expand Down

0 comments on commit 2f99cdc

Please sign in to comment.