Skip to content

Workflow fix - #232

Open
lm-sousa wants to merge 68 commits into
lmsousafrom
workflow-fix
Open

Workflow fix#232
lm-sousa wants to merge 68 commits into
lmsousafrom
workflow-fix

Conversation

@lm-sousa

@lm-sousa lm-sousa commented Aug 8, 2026

Copy link
Copy Markdown
Member

No description provided.

lm-sousa added 30 commits July 15, 2026 17:13
Load clang-dumper assets from the v16.0.5_3 release manifest and remove the legacy archive resource map.

Update Clang 18 enum values, parser tolerance, bundled include/CUDA handling, and JS expectations needed by the new dumper.
Use entrypoints.txt from extracted clang-dumper include archives as the ordered system include roots.

Throw when entrypoints.txt is missing instead of inferring roots from archive folder names.
Allow parser tests to select a local dumper without disturbing release cache assets. Restore strict resolution of referenced nodes so incomplete dumper output fails at its source.
Share the system-header threshold spelling between Clava's tool and plugin invocation paths.
Treat absolute tag-file values as build directories, use their local tool or plugin without release downloads or checksum validation, and force system-provided headers. Remove the superseded executable override and cover source parsing and local tool selection.
Add support for Clang's CXXParenListInitExpr node and preserve the original parenthesized argument list during code generation. Add an integration test covering aggregate initialization under C++20.
Key the in-process lock by the shared release cache lock file so concurrent libc and CUDA configurations cannot acquire different JVM locks for the same cache folder.
Store per-version cache locks beside the version directory so cleanup can delete the directory while holding the lock on Windows, Linux, and macOS. Update the cache cleanup test to use the shared lock-path helper.
Discover a system CUDA toolkit from portable environment, PATH, and platform-specific locations when bundled headers are unavailable. Continue with a single warning when no toolkit is found instead of rejecting local builds.
Coordinate cache initialization and stale cleanup with a temporary directory claim that is removed on release. Keep the claim outside version folders for Windows deletion and recover claims left by terminated processes.
Write the shared CUDA compatibility resource to a unique temporary file and install it with an atomic move, preventing concurrent Clava instances from reading a partial header.
Restore callinit and listinit as explicit enum values because the generated TypeScript API exposes raw strings without an enum conversion.
Add same-JVM, cross-JVM, multi-version, crash-recovery, stale-cleanup, and real release initialization coverage for the clang-dumper cache. Keep red diagnostic tests for reclaimed-lock release and cached last-used updates bypassing the cache lock.
Add a cross-JVM diagnostic proving stale cleanup can remove an executable still referenced by the in-process ClangFiles cache.
lm-sousa added 26 commits August 5, 2026 23:14
Keep the clang-dumper includes archive limited to built-in libc/libc++ and configure the system Clang resource directory for SYSTEM-mode CUDA parsing. Built-in CUDA supplies only the NVIDIA cudalib. Select a host-compatible CUDA platform from the intersection of all required NVIDIA manifest components, then reuse that parsed manifest for installation.

Tests: CudaResourcesTest, ClangResourcesTest, and CxxCudaTest
Resolve AUTO once after the clang-dumper executable is selected and carry the concrete mode through resource preparation, cache state, and per-translation-unit configuration. Keep local and plugin paths on SYSTEM, including the system Clang resource directory for built-in CUDA.

Make CUDA support detection return false only for a validated manifest with no compatible host platform; propagate download, cache, parse, validation, and component failures.

Tests: CudaResourcesTest (16), ClangResourcesTest (27), CxxCudaTest (6)
Introduce a root Clava Gradle aggregate for Java and Clava-JS build/test tasks, validate the Clava-JS java-binaries symlink against ClavaWeaver installDist, and wire Clava-JS Jest runs to JaCoCo so Node-hosted JVM coverage is merged with Java test coverage.
Adopt the Lara-JS shared lint and formatter configuration, replace Jest test setup with Vitest, and run TypeScript tests through Node natively.
Keep TypeScript explicitly declared for Clava-JS type checking.
Allow the known long-running InlineNasLu and Inliner tests up to ten seconds without changing the suite-wide timeout.
Give the long-running Inliner integration test a fifteen-second timeout while retaining InlineNasLu at ten seconds.
Adopt the shared Oxlint configuration and Oxfmt scripts, retaining lint exclusions with Oxlint directives.
Run API and code tests in one Vitest configuration backed by Lara’s shared Weaver lifecycle helper, while preserving package test filters.
Materialize ClavaWeaver's distribution for every installDist, make aggregate JS builds depend on the synchronized output, and validate npm package contents through Lara's shared helper.
Copilot AI lite review requested due to automatic review settings August 8, 2026 11:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR substantially expands the build and CI/test infrastructure across the repository: it introduces a composite Gradle build at the repo root, migrates Clava-JS from Jest/ESLint to Vitest/Oxlint, and modernizes the Clang/CUDA resource management + language feature support in the Java parser/tooling.

Changes:

  • Add a root composite Gradle build (settings.gradle + build.gradle) that orchestrates Java builds/tests, Clava-JS build/tests, and merged JaCoCo reporting.
  • Migrate Clava-JS tooling from Jest/ESLint to Vitest/Oxlint and update docs/scripts/config accordingly.
  • Update Clang AST parser resource handling (manifest-based downloads, cache/locking/cleanup, built-in CUDA redistribution support) and extend language/type modeling (standards, unary transform types, new AST node kinds).

Reviewed changes

Copilot reviewed 77 out of 79 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
settings.gradle Adds composite build includes for the Java subprojects.
ClavaWeaver/src/pt/up/fe/specs/clava/weaver/importable/AstFactory.java Updates elaborated type keyword usage to renamed enum value.
ClavaWeaver/resources/clava/test/weaver/cpp/results/TypeTemplate.js.txt Adjusts expected test output formatting/line.
ClavaWeaver/build.gradle Adds a Sync task to keep Clava-JS java-binaries in sync with installDist.
ClavaAst/src/pt/up/fe/specs/clava/language/Standard.java Extends/renames language standard enums (C/C++/GNU variants).
ClavaAst/src/pt/up/fe/specs/clava/ast/type/UnaryTransformType.java Makes underlying type optional for dependent unary transforms.
ClavaAst/src/pt/up/fe/specs/clava/ast/type/enums/UnaryTransformTypeKind.java Expands unary transform kind enum values.
ClavaAst/src/pt/up/fe/specs/clava/ast/type/enums/ElaboratedTypeKeyword.java Renames elaborated type keyword enum constants and adjusts code generation.
ClavaAst/src/pt/up/fe/specs/clava/ast/type/enums/CallingConvention.java Adds M68kRTD calling convention.
ClavaAst/src/pt/up/fe/specs/clava/ast/type/ElaboratedType.java Removes stray blank line in getCode.
ClavaAst/src/pt/up/fe/specs/clava/ast/extra/data/Language.java Adds C++26 capability flag key.
ClavaAst/src/pt/up/fe/specs/clava/ast/expr/StringLiteral.java Preserves source spelling for UNEVALUATED strings.
ClavaAst/src/pt/up/fe/specs/clava/ast/expr/enums/StringKind.java Adds UNEVALUATED string kind and prefix behavior.
ClavaAst/src/pt/up/fe/specs/clava/ast/expr/CXXParenListInitExpr.java Adds AST node for C++20 paren-list initialization expressions.
ClavaAst/src/pt/up/fe/specs/clava/ast/decl/enums/Linkage.java Renames linkage enum values and adds Invalid.
ClavaAst/src/pt/up/fe/specs/clava/ast/decl/enums/InitializationStyle.java Adds ParenListInit and updates initialization style codegen.
ClavaAst/src/pt/up/fe/specs/clava/ast/attr/enums/AttributeKind.java Extends attribute kind enum with newer Clang attributes.
Clava-JS/vitest/ClavaLegacyTester.ts Adds a Vitest-based legacy tester wrapper.
Clava-JS/vitest.config.ts Adds Vitest configuration via Lara helper.
Clava-JS/tsconfig.json Switches TS test globals typing from Jest to Vitest.
Clava-JS/README.md Documents new combined Gradle workflow for build/test/coverage.
Clava-JS/package.json Migrates scripts/tooling to Vitest + Oxlint; adjusts exports/files.
Clava-JS/oxlint.config.ts Adds Oxlint config extending Lara’s config.
Clava-JS/jest/ClavaLegacyTester.ts Removes Jest-based legacy tester wrapper.
Clava-JS/jest.config.ts Removes root Jest config.
Clava-JS/eslint.config.ts Removes ESLint configuration in favor of Oxlint.
Clava-JS/code/sideEffects.ts Updates cache folder selection for the Java dumper folder.
Clava-JS/code/jest.config.ts Removes Jest config for code tests.
Clava-JS/code/ClangPlugin/ClangPlugin.test.ts Migrates test mocking from Jest to Vitest (vi).
Clava-JS/api/SourceLocations.test.ts Adds new source location tests (currently imports Jest helper).
Clava-JS/api/Query.test.ts Migrates test helper import to Vitest weaver helpers.
Clava-JS/api/LegacyIntegrationTests - Issues.test.ts Migrates legacy integration tests to Vitest harness + Oxlint directives.
Clava-JS/api/LegacyIntegrationTests - CXX.test.ts Migrates legacy integration tests to Vitest harness + Oxlint directives.
Clava-JS/api/LegacyIntegrationTests - C.test.ts Migrates legacy integration tests to Vitest harness; adjusts timeouts.
Clava-JS/api/Joinpoints.ts Updates string “enum” constants for StorageClass/Relation.
Clava-JS/api/jest.config.ts Removes Jest config for API tests.
Clava-JS/api/Issues.test.ts Migrates test helper imports to Vitest weaver helpers.
Clava-JS/api/clava/ClavaJoinPoints.test.ts Migrates test helper imports to Vitest weaver helpers.
Clava-JS/api/clava/ClavaJavaTypes.ts Updates lint-disable directives for Oxlint.
ClangAstParser/test/pt/up/fe/specs/clang/parsers/ClavaNodesTest.java Adds tests for optional node resolution behavior.
ClangAstParser/test/pt/up/fe/specs/clang/parser/tests/UnaryTransformTypeTest.java Adds regression test for dependent unary transform types.
ClangAstParser/test/pt/up/fe/specs/clang/parser/tests/SourceLocationsTest.java Adds Java-side regression tests for source ranges/macros.
ClangAstParser/test/pt/up/fe/specs/clang/parser/tests/InitializationStyleTest.java Adds tests for ParenListInit and JS name compatibility.
ClangAstParser/test/pt/up/fe/specs/clang/parser/tests/CxxTest.java Adds unevaluated strings test case.
ClangAstParser/test/pt/up/fe/specs/clang/parser/tests/CxxCudaTest.java Re-enables/expands CUDA tests with libc mode coverage.
ClangAstParser/test/pt/up/fe/specs/clang/parser/CxxCudaTester.java Updates CUDA support detection gating.
ClangAstParser/test/pt/up/fe/specs/clang/CudaResourcesTest.java Adds extensive tests for CUDA redistribution caching/validation/concurrency.
ClangAstParser/test/pt/up/fe/specs/clang/ClangResourcesTest.java Adds extensive tests for dumper resources/includes cache/locking semantics.
ClangAstParser/test-resources/cxx/unevaluated_strings.cpp.txt Adds expected output resource for unevaluated string test.
ClangAstParser/test-resources/cxx/unevaluated_strings.cpp Adds C++ source fixture for unevaluated string test.
ClangAstParser/test-resources/cxx/source_locations.cpp Adds C++ source fixture for source location tests.
ClangAstParser/test-resources/cxx/paren_list_initialization.cpp Adds C++ source fixture for ParenListInit test.
ClangAstParser/test-resources/cxx/dependent_scope_decl_ref_expr.cpp.txt Updates expected output formatting for long string literal.
ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java Adjusts Linux platform detection (removes ARM hard-fail).
ClangAstParser/src/pt/up/fe/specs/clang/parsers/LanguageParser.java Parses new C++26 capability flag.
ClangAstParser/src/pt/up/fe/specs/clang/parsers/data/TypeDataParser.java Uses queueSetOptionalNode for optional underlying type nodes.
ClangAstParser/src/pt/up/fe/specs/clang/parsers/data/ExprDataParser.java Switches character kind parsing from int to enum name.
ClangAstParser/src/pt/up/fe/specs/clang/parsers/ClavaNodes.java Strengthens resolution errors for required/optional/nullable nodes.
ClangAstParser/src/pt/up/fe/specs/clang/parsers/ClavaNodeParser.java Cleans up exception formatting.
ClangAstParser/src/pt/up/fe/specs/clang/dumper/ClangAstParser.java Minor cleanup; enforces node presence checks.
ClangAstParser/src/pt/up/fe/specs/clang/dumper/ClangAstDumper.java Refactors flags/resources; adds system resource-dir support; updates CUDA/std behavior.
ClangAstParser/src/pt/up/fe/specs/clang/CudaResources.java Adds NVIDIA redist manifest-driven CUDA cache/install assembly.
ClangAstParser/src/pt/up/fe/specs/clang/codeparser/ParallelCodeParser.java Threads resolved libc mode + system resource dir into parse jobs and app config.
ClangAstParser/src/pt/up/fe/specs/clang/codeparser/CodeParser.java Clarifies DUMPER_FOLDER semantics as base cache folder.
ClangAstParser/src/pt/up/fe/specs/clang/ClangResources.java Replaces legacy resource manager with manifest/assets + cache/locking/cleanup.
ClangAstParser/src/pt/up/fe/specs/clang/ClangFiles.java Extends ClangFiles to carry system resource dir and concrete libc mode.
ClangAstParser/src/pt/up/fe/specs/clang/ClangAstWebResource.java Replaces enum-style URLs with release-tag + manifest-based asset resolution.
ClangAstParser/src/pt/up/fe/specs/clang/ClangAstResource.java Removes obsolete commented-out resource definitions.
ClangAstParser/src/pt/up/fe/specs/clang/ClangAstKeys.java Removes deprecated clang-dumper version flag parsing.
ClangAstParser/src/pt/up/fe/specs/clang/ClangAstFileResource.java Removes legacy file resource enum.
ClangAstParser/src/pt/up/fe/specs/clang/CacheFiles.java Adds cache staging/publish, maintenance lock, hashing, cleanup utilities.
ClangAstParser/cuda-release.tag Adds pinned CUDA release tag for built-in redistribution.
ClangAstParser/clang-dumper-release.tag Adds pinned clang-dumper release tag (or local build path).
ClangAstParser/build.gradle Adds gson/compress/xz deps and packages release-tag resources.
build.gradle Adds root build orchestration tasks (npm build/test, installDist sync, merged JaCoCo).
.github/workflows/nightly.yml Runs on PRs and uses new dependency ref resolver + pinned head SHA checkout.
.github/workflows/copilot-setup-steps.yml Mirrors nightly workflow updates and runs resolver tests.
.github/scripts/test-resolve-dependency-refs.sh Adds test harness for dependency ref resolver logic.
.github/scripts/resolve-dependency-refs.sh Adds resolver script for selecting dependency refs/branches safely.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -0,0 +1,94 @@
import { registerSourceCode } from "@specs-feup/lara/jest/jestHelpers.ts";

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 372ffc2c1c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread build.gradle
})

classDirectories.from(clavaCoverageProjects.collect { projectInfo ->
layout.projectDirectory.dir("${projectInfo.name}/build/classes/java")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude test classes from merged coverage

When clavaMergedJacocoReport runs after the Java tests, each configured build/classes/java directory contains output for both production and test source sets (and ClavaWeaver's spec source set). Passing the parent directory makes JaCoCo analyze test classes as covered code, inflating and otherwise distorting the merged coverage metrics; select the intended main/spec class directories explicitly instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants