Skip to content
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

build,win: put all compilation artifacts into `out` #27149

Merged
merged 1 commit into from Apr 12, 2019

Conversation

Projects
None yet
5 participants
@refack
Copy link
Member

refack commented Apr 9, 2019

Solves (almost completely) the unnecessary distribution of build artifacts all over the repo.
In order to keep this semver-patch I've added a symlinking step:

node/vcbuild.bat

Lines 326 to 327 in 2ee659c

:after-build
if EXIST out\%config% mklink /D %config% out/%config%

Also has some small tweaks.

what's left to solve is the locations of the .vcxproj files. That requires a GYP patch

/CC @nodejs/build-files @nodejs/platform-windows

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@nodejs-github-bot

This comment has been minimized.

@bnoordhuis
Copy link
Member

bnoordhuis left a comment

Not a Windows expert but the changes LGTM.

Show resolved Hide resolved node.gyp Outdated

@refack refack self-assigned this Apr 9, 2019

@refack refack added the author ready label Apr 9, 2019

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@refack refack force-pushed the refack:gyp-opt-fix-win-out-dir branch from 2ee659c to 42973e6 Apr 12, 2019

@nodejs-github-bot

This comment has been minimized.

@nodejs nodejs deleted a comment from nodejs-github-bot Apr 12, 2019

build,win: put all compilation artifacts into `out`
* Add symlink from Release to out\Release for backward compat

PR-URL: #27149
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>

@refack refack force-pushed the refack:gyp-opt-fix-win-out-dir branch from 42973e6 to 25df3c1 Apr 12, 2019

@refack refack merged commit 25df3c1 into nodejs:master Apr 12, 2019

@refack refack deleted the refack:gyp-opt-fix-win-out-dir branch Apr 12, 2019

@richardlau

This comment has been minimized.

Copy link
Member

richardlau commented Apr 13, 2019

@refack:

I've just spent a long time trying to work out why changes I made weren't being reflected when I run node... It turns out on Windows 7 I'm getting this:

  node.vcxproj -> out\Release\\node.exe
You do not have sufficient privilege to perform this operation.

C:\work\node\github\nodejs>

i.e.

if EXIST out\%config% mklink /D %config% out\%config%
is failing.

Unfortunately I didn't immediately spot this and ended up running the old Release\node from a previous compilation before this PR landed (tools/test.py still looks for Release\node). It works if I run the command prompt as administrator but I previously did not have to do that to build Node.js.

Does this work on later versions of Windows without Administrator privileges? (I can't check on Windows 10 until Monday at the earliest).

@refack

This comment has been minimized.

Copy link
Member Author

refack commented Apr 13, 2019

Thanks for the report.

  node.vcxproj -> out\Release\\node.exe
You do not have sufficient privilege to perform this operation.

C:\work\node\github\nodejs>

Did vcbuild.bat exit at that point?

Does this work on later versions of Windows without Administrator privileges? (I can't check on Windows 10 until Monday at the earliest).

It was an issue that was addressed by MS for Windows 10 (at least, maybe even for Windows 8.1).
I run my dev env in a non privileged cmd session, so this should be Ok. I'll triple check.

On CI we do run under an admin account by in an non privileged session, so that's half way to a proper testing env (we do not CI test with Windows 7, but we do with Server2008R2 which is the equivalent Server release).

(tools/test.py still looks for Release\node).

Originally I fixed that, but choose to revert because of CI legacy issues...

P.S. posted a notice at https://github.com/orgs/nodejs/teams/collaborators/discussions/72

@richardlau

This comment has been minimized.

Copy link
Member

richardlau commented Apr 13, 2019

Thanks for the report.

  node.vcxproj -> out\Release\\node.exe
You do not have sufficient privilege to perform this operation.

C:\work\node\github\nodejs>

Did vcbuild.bat exit at that point?

No it continues, which is why I missed it the first few times and only really spotted it when I cut down my vcbuild.bat invocation to vcbuild.bat openssl-no-asm.

Does this work on later versions of Windows without Administrator privileges? (I can't check on Windows 10 until Monday at the earliest).

It was an issue that was addressed by MS for Windows 10 (at least, maybe even for Windows 8.1).
I run my dev env in a non privileged cmd session, so this should be Ok. I'll triple check.

On CI we do run under an admin account by in an non privileged session, so that's half way to a proper testing env (we do not CI test with Windows 7, but we do with Server2008R2 which is the equivalent Server release).

(tools/test.py still looks for Release\node).

Originally I fixed that, but choose to revert because of CI legacy issues...

ack

@refack refack referenced this pull request Apr 13, 2019

Open

build,win: bail vcbuild if mklink fails #27216

3 of 4 tasks complete

@refack refack removed their assignment Apr 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.