Skip to content

[native_assets_builder] add WINDIR and SYSTEMDRIVE to allowed env list #2084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

rainyl
Copy link
Contributor

@rainyl rainyl commented Mar 10, 2025

  • Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any relevant issues, and review the contribution guidelines below.

Closes: #2077

As @dcharkes suggested, this PR add WINDIR and SYSTEMDRIVE to hookEnvironmentVariablesFilter at

static const hookEnvironmentVariablesFilter = {
'ANDROID_HOME', // Needed for the NDK.
'HOME', // Needed to find tools in default install locations.
'PATH', // Needed to invoke native tools.
'PROGRAMDATA', // Needed for vswhere.exe.
'SYSTEMROOT', // Needed for process invocations on Windows.
'TEMP', // Needed for temp dirs in Dart process.
'TMP', // Needed for temp dirs in Dart process.
'TMPDIR', // Needed for temp dirs in Dart process.
'USER_PROFILE', // Needed to find tools in default install locations.
};


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Copy link
Collaborator

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

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

lgtm w comments

@@ -433,6 +433,8 @@ ${e.message}
'TMP', // Needed for temp dirs in Dart process.
'TMPDIR', // Needed for temp dirs in Dart process.
'USER_PROFILE', // Needed to find tools in default install locations.
'WINDIR', // Needed for CMake.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Alphabetical sorting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean to sort the added 2 items or the whole set?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The whole set 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 😄

@@ -433,6 +433,8 @@ ${e.message}
'TMP', // Needed for temp dirs in Dart process.
'TMPDIR', // Needed for temp dirs in Dart process.
'USER_PROFILE', // Needed to find tools in default install locations.
'WINDIR', // Needed for CMake.
'SYSTEMDRIVE', // Needed for CMake.
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for the CMAKE_TOOLCHAIN_FILE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's not necessary, and usually CMAKE_TOOLCHAIN_FILE is not an env variable but a definition of cmake cli.

Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

@dcharkes dcharkes merged commit 72cc2e0 into dart-lang:main Mar 10, 2025
32 checks passed
@rainyl rainyl deleted the hook-env-filter-cmake branch March 10, 2025 12:49
@coveralls
Copy link

coveralls commented Mar 10, 2025

Coverage Status

coverage: 88.6%. remained the same
when pulling 7cdec59 on rainyl:hook-env-filter-cmake
into 318f841 on dart-lang:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[native_assets] Process.start hangs when executed in build method on Windows.
3 participants