Multi weaver - #100
Open
lm-sousa wants to merge 8 commits into
Open
Multi weaver#100lm-sousa wants to merge 8 commits into
lm-sousa wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements a major architectural refactoring to enable support for multiple concurrent weaver instances by removing the thread-local weaver pattern and introducing explicit weaver references throughout the codebase.
Changes:
- Removed thread-local
WeaverEnginestorage, requiring join points to receive aWeaverEnginereference via constructor - Updated code generation in
WeaverGeneratorto produce join point constructors that accept weaver references - Removed deprecated JavaScript APIs (
Ast.ts,Weaver.serialize,Weaver.deserialize) and the--versionCLI option - Updated GitHub workflows to improve branch resolution logic for dependency repositories
- Updated multiple npm package dependencies in Lara-JS
Reviewed changes
Copilot reviewed 67 out of 67 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| WeaverInterface/src/org/lara/interpreter/weaver/interf/WeaverEngine.java | Removed thread-local weaver storage (getThreadLocalWeaver, setWeaver, removeWeaver, isWeaverSet) and getNameAndBuild() method |
| WeaverInterface/src/org/lara/interpreter/weaver/interf/JoinPoint.java | Added weaver field and constructor parameter to store weaver reference per join point instance |
| WeaverInterface/src/org/lara/interpreter/weaver/ast/AAstMethods.java | Added getWeaverEngine() accessor method |
| WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/helpers/*.java | Updated code generators to include weaver constructor parameters in generated join point classes |
| WeaverGenerator/test-resources/golden//.java.txt | Updated golden test files reflecting new constructor patterns with weaver parameters |
| WeaverGenerator/test-resources/spec/valid/medium/actionModel.xml | Added return type (joinpoint[]) to the insert action |
| WeaverInterface/test/**/*.java | Updated all tests to pass weaver references when constructing join points |
| DefaultWeaver/src/org/lara/interpreter/weaver/defaultweaver/**/*.java | Updated join point implementations to accept and pass weaver references |
| Lara-JS/src-code/Weaver.ts | Removed setWeaver() call and stored weaver reference in globalThis.__hidden |
| Lara-JS/src-api/weaver/Weaver.ts | Changed getWeaverEngine() to access weaver from globalThis.__hidden, removed serialize, deserialize, and AST_METHODS |
| Lara-JS/src-api/weaver/Ast.ts | Deleted entire deprecated AST utility class |
| Lara-JS/src-api/core.ts | Deleted auto-import initialization file |
| Lara-JS/src-api/lara/benchmark/BenchmarkInstance.ts | Replaced AST caching with error throw since serialize/deserialize were removed |
| Lara-JS/package.json | Updated multiple npm dependencies to newer versions |
| Lara-JS/eslint.config.js | Fixed tsconfigRootDir placement and added __dirname setup for ES modules |
| LARAI/src/org/lara/interpreter/cli/CLIOption.java | Removed version CLI option |
| LARAI/src/org/lara/interpreter/cli/*.java | Removed version option handling from parsers and interfaces |
| LARAI/src/org/lara/interpreter/utils/LaraIUtils.java | Removed version printing logic from printHelp() |
| LARAI/test/**/*.java | Removed tests for version option functionality |
| .github/workflows/nightly.yml | Improved branch resolution logic with priority-based ref determination |
| .github/workflows/copilot-setup-steps.yml | Applied same branch resolution improvements as nightly workflow |
| .github/workflows/ant-lara-2.0-legacy.yml | Changed cron schedule from daily to monthly, updated checkout action to v6 |
| .github/copilot-instructions.md | Removed reference to deleted core.ts file |
lm-sousa
force-pushed
the
multi-weaver
branch
from
January 18, 2026 23:13
6d36bb8 to
67fed4b
Compare
lm-sousa
force-pushed
the
multi-weaver
branch
from
September 2, 2026 23:25
67fed4b to
96e03f5
Compare
lm-sousa
force-pushed
the
multi-weaver
branch
from
September 3, 2026 00:26
96e03f5 to
526e42f
Compare
…ad-local weaver references
Root Cause: The test was calling WeaverGenerator.main(args) which internally calls System.exit(), terminating the JVM before the golden file comparison could execute. This is why the changes to WeaverGenerator weren't being detected - the comparison code was never reached. Fix Applied: Changed both calls from WeaverGenerator.main(args) to WeaverGenerator.run(args) with proper exit code assertions. Result: The tests now run to completion and properly compare generated files against golden files.
…the past commits. - Removed the version option from CLIOption and related parsing logic. - Updated OptionsParser to remove references to the version option. - Adjusted help printing methods to exclude version information. - Modified tests to reflect the removal of the version option, ensuring no references remain in CLIOptionTest and OptionsBuilderUtilsTest. - Updated various tests to use the new TestJoinPoint constructor that requires a WeaverEngine instance. - Cleaned up WeaverEngine and JoinPoint tests to remove unnecessary thread-local weaver management. - Ensured all tests are consistent with the new structure and functionality.
lm-sousa
force-pushed
the
multi-weaver
branch
from
September 3, 2026 03:29
526e42f to
c22ec3a
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.