Skip to content

Multi-weaver - #65

Open
lm-sousa wants to merge 6 commits into
mainfrom
multi-weaver
Open

Multi-weaver#65
lm-sousa wants to merge 6 commits into
mainfrom
multi-weaver

Conversation

@lm-sousa

@lm-sousa lm-sousa commented Sep 7, 2026

Copy link
Copy Markdown
Member

Note

omen-alpha responding on behalf of @lm-sousa

Problem

The multi-weaver branch (weaver-instance refactor: removal of THREAD_LOCAL_WEAVER, Weaver engine threading through the joinpoints, CI fixes) was 622 commits behind main and needed a rebase before the lara-4 work on top of it.

Solution

Rebased the 5 multi-weaver commits onto the current main tip (049d3ae0). Conflict resolutions:

  • FortranJoinpoints.java: took main's node-association fixes (new wildcard imports, ~50 new factory entries, SpecsLogs.debug fix) and re-applied the full multi-weaver threading (FunctionClassMapBiFunctionClassMap<FortranNode, FortranWeaver, ...>, create(node, weaver, ...) factories).
  • GenericFortranJoinpoint.java: kept both sides — main's imports/fields and multi-weaver's (FortranNode, FortranWeaver) constructor with super(weaver).
  • FortranWeaver.json: took main's regeneration wholesale — verified programmatically that it already contains every multi-weaver attribute addition (all 53 sections have children, file has foldername+children, program has children).
  • Fortran-JS/package.json: kept main's version (22.2.1) and multi-weaver's dependency updates (jest 30.x, eslint 9.39, TS 5.9, ...).
  • nightly.yml: main's cron/matrix/triggers + the branch-resolver (repo-refs) ref-determination rewrite; adds copilot-setup-steps.yml.

git range-diff against the pre-rebase branch confirms all hunks survived.

Stack

This is the base of a stack: mainthis PR (multi-weaver) ← lara-4 (#64), which migrates the weaver to lara-4/WeaverGen2.

Post-rebase compile fixes

The rebase was validated with git range-diff, not by compiling — CI then surfaced the remaining debt (exactly the items flagged as "compile debt" during the rebase), fixed in a follow-up commit on this branch:

  • FortranWeaver.getContext()/getFactory() made instance methods (they routed through the removed getFortranWeaver() static).
  • main's new importable/AstFactory converted to weaver-threaded create(node, weaver, targetClass) calls (17 sites).
  • ~34 new F* joinpoint classes from main converted to the (node, FortranWeaver) constructor pattern; 14 dangling create() call sites in AFortranWeaverJoinPoint threaded.
  • copilot-setup-steps.yml: actions pinned to full commit SHAs (Sonar rule githubactions:S7637, the file is new code in this PR).

Comment thread .github/workflows/copilot-setup-steps.yml Fixed
Main's rebased code still used the removed static weaver accessors and
1-arg FortranJoinpoints.create. Thread the FortranWeaver instance
through instead of restoring static/THREAD_LOCAL access:

- FortranWeaver: make getFactory()/getContext() instance methods
  (getContext() referenced the removed getFortranWeaver() static)
- AstFactory: take FortranWeaver as first parameter (same shape as the
  lara-4 branch), call weaver.getFactory() and 3-arg
  FortranJoinpoints.create(node, weaver, targetClass)
- AFortranWeaverJoinPoint: thread getWeaverEngine() into the remaining
  main-era create() call sites and replace ::create method refs with
  weaver-capturing lambdas
- joinpoints/F*: all concrete joinpoints from main now take
  (node, FortranWeaver) constructors with super(weaver) (or
  super(new FWrapper(node, weaver), weaver)); child-collection methods
  thread getWeaverEngine() into create()

Also pin GitHub Actions to full commit SHAs in copilot-setup-steps.yml
(Sonar S7637).

Verified with: gradle -p FortranWeaver compileJava (BUILD SUCCESSFUL,
JDK 17, lara-framework/specs-java-libs multi-weaver/master checkouts)
@lm-sousa lm-sousa closed this Sep 7, 2026
@lm-sousa lm-sousa mentioned this pull request Sep 7, 2026
@lm-sousa lm-sousa reopened this Sep 7, 2026
@lm-sousa lm-sousa changed the title Rebase multi-weaver onto main Multi-weaver Sep 7, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

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