Workflow fix - #232
Workflow fix#232lm-sousa wants to merge 99 commits into
Conversation
… generator. This is a massive (but imcomplete) commit. - Replaced the old XML-based Language Specification with the new Java embedded-DSL one. - Updated joinpoint concrete classes to extend their respective abstract classes with a generic CRTP pattern Self type parameter. - Simplified concrete types by having a single direct class hierarchy enforced by the generator. - Concretes no longer declare the node field. That is done in the basae abstract jp in LARA. - Refactored methods to use getNodeImpl() for consistency in accessing underlying AST nodes. - Updated ClavaDirective and ClavaPragmas to use the new AJoinpoint interface. - Adjusted ClavaAstMethods to accommodate changes in JoinPoint interface.
…rchy and the generator.
…vaException import
…ing' from actions into attributes.
… to escape forbidden Java keywords.
… a few type casting problems. They warrant further analysis.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
💡 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".
| }) | ||
|
|
||
| classDirectories.from(clavaCoverageProjects.collect { projectInfo -> | ||
| layout.projectDirectory.dir("${projectInfo.name}/build/classes/java") |
There was a problem hiding this comment.
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 👍 / 👎.
…nly erasable syntax is allowed - Removed a couple of deprecated files. - Transformed enums into "const" declarations. - Modified the tsconfig.json files - Updated to TS 6 while I was at it.
Since we do not transpile TS anymore, the sources have been moved to their old destination folders.
…uild script in package.json
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.
SourceLocations.test.ts still imported @specs-feup/lara/jest/jestHelpers.ts, which no longer exists after the Vitest migration, breaking tsc on all platforms.
Replaces the vendored copies of resolve-dependency-refs.sh and its test suite with the specs-feup/branch-resolver@v1 composite action, which exports <prefix>_ref/_branch/_default as environment variables.
build-js had no ref, so pull_request runs tested the synthetic merge commit while build-java built the PR head; JS tests then consumed Java binaries from a different revision. Pin both jobs to github.event.pull_request.head.sha || github.sha.
A push to a feature branch with an open PR fired both the push run and the pull_request synchronize run for the same commit. Feature branches are covered by pull_request; push now builds only the long-lived branches.
|




No description provided.