Skip to content

Workflow fix - #111

Open
lm-sousa wants to merge 11 commits into
java-deprecationfrom
workflow-fix
Open

Workflow fix#111
lm-sousa wants to merge 11 commits into
java-deprecationfrom
workflow-fix

Conversation

@lm-sousa

Copy link
Copy Markdown
Member

No description provided.

fileURLToPath() produced a plain Windows path (D:\...), which the ESM
loader misread as the protocol 'vitest-environment-d:' when spawning
forks workers. Passing an href file:// URL works on all platforms.
Vitest only treats the environment value as a path when it starts with
'.' or '/'; absolute POSIX paths leaked a file:// scheme that crashed
dependency detection, and Windows drive paths were misread as the
protocol 'vitest-environment-d:'. Compute a './'-prefixed path relative
to the config root instead, which works on every platform.
ConfigEnv does not expose the project root; Vitest defaults to the
process cwd, which is where tests are always launched from.
The function form of defineConfig does not typecheck against Vitest's
overloads; the root-relative environment path is computed eagerly
instead, since tests always launch from the package directory.
Copilot AI lite review requested due to automatic review settings August 28, 2026 20:56

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@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: dbeb388749

ℹ️ 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".

with:
path: lara-framework
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

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 Checkout the same PR revision in both build jobs

On pull_request runs where the base branch contains commits absent from the PR head, this forces build-java to build the head commit, while the unchanged checkout in build-js uses the pull request's synthetic merge commit. The JS tests then consume Java binaries built from a different Lara revision, so integration failures can be missed or spurious failures can occur; both jobs should use the same revision.

Useful? React with 👍 / 👎.

Comment on lines +20 to +22
const root = process.cwd();
const environmentPath = path
.relative(root, fileURLToPath(new URL("./weaverEnvironment.ts", import.meta.url)))

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 Derive the environment path from Vitest's actual root

When this exported config helper is used with a Vitest root different from process.cwd()—for example, vitest --root Lara-JS launched from the repository root—the generated path is relative to the process directory but Vitest resolves ./... against its configured project root. That produces a duplicated or otherwise incorrect path and prevents the custom environment from loading; the relative path must be based on the effective Vitest root.

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