Skip to content

build: experiment with windows testing#29637

Closed
devversion wants to merge 7 commits intoangular:mainfrom
devversion:experiment-windows
Closed

build: experiment with windows testing#29637
devversion wants to merge 7 commits intoangular:mainfrom
devversion:experiment-windows

Conversation

@devversion
Copy link
Member

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Feb 13, 2025
@devversion devversion force-pushed the experiment-windows branch 29 times, most recently from 3f1fcf5 to 9eaaafa Compare February 14, 2025 13:31
@devversion devversion force-pushed the experiment-windows branch 21 times, most recently from 1ba95c8 to 0085f66 Compare February 17, 2025 14:52
toolchains = toolchains + ["@npm//@angular/build-tooling/bazel/browsers/chromium:toolchain_alias"]
data = data + ["@npm//@angular/build-tooling/bazel/browsers/chromium"]

windows_node_repo = kwargs.pop("windows_node_repo", None)
Copy link
Member

Choose a reason for hiding this comment

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

How does all of this work below if windows_node_repo is actually None?

For instance "@//:node_files" is invalid right?

data = select({
"@bazel_tools//src/conditions:windows": data + windows_node_files,
"//conditions:default": data + windows_node_files,
#"//conditions:default": data,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#"//conditions:default": data,

…ble variant

When testing native Windows via WSL, the loopback address (localhost) is
not necessarily the correct one anymore.

NOTE: This is not needed for general development/testing inside WSL;
it's just needed because we still want to test native Windows on CI,
and launch powershell/cmd from inside WSL to simulate a real native
Windows CLI user experience.

Context on why this is needed: When spawning e.g. ng serve via CMD, the
process runs outside WSL, so `localhost`, when a test wants to assert the
served content, is not correct. Instead the NAT IP of the Windows host
needs to be used directly. This is what this change enables.

Notably WSL does have a mirrored networking mode, but it doesn't work
well. Requests from WSL to the Windows host typically fail with
connection refused errors (and there are many issues reported). The NAT
approach (default by WSL) is safer, and works, but is a little more work
as can be seen in this commit.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

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

Labels

area: build & ci Related the build and CI infrastructure of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants