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: refactor vcbuild.bat #12310

Closed
refack opened this issue Apr 10, 2017 · 13 comments
Closed

build: refactor vcbuild.bat #12310

refack opened this issue Apr 10, 2017 · 13 comments
Assignees
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform. wip Issues and PRs that are still a work in progress.

Comments

@refack
Copy link
Contributor

refack commented Apr 10, 2017

  • Version: master
  • Platform: Windows
  • Subsystem: build

I want to refactor/rewrite vcbuild.bat. The options are:

  1. JScript via cscript
    Pros: Looks like javascript. Built into Windows
    Cons: Might get deprecated. ES3-- syntax.
  2. Powershell
    Pros: Prefered by Microsoft. Fully structured scripting language. OSS and portable
    Cons: New language
  3. Python
    Pros: on par with other tools
    Cons: increases dependency on python as a requirement for building node

Please voice your opinion. We can do a facebook style poll:
🎉 for JScript
👍 for Powershell
😄for python
😕for just tweaking the batch file

Ref: cscript future?

@refack refack self-assigned this Apr 10, 2017
@refack
Copy link
Contributor Author

refack commented Apr 10, 2017

/cc @nodejs/platform-windows @nodejs/build

@refack refack added build Issues and PRs related to build files or the CI. discuss Issues opened for discussions and feedbacks. windows Issues and PRs related to the Windows platform. labels Apr 10, 2017
@jbergstroem
Copy link
Member

I'm with @joaocgreis's future vote :)

@refack
Copy link
Contributor Author

refack commented Apr 11, 2017

Seems like there's consensus for Powershell...
(I might make a JScript one for fun...)

@joaocgreis
Copy link
Member

The cons of Python doesn't look very relevant to me: in node-gyp it would be nice to remove it as a dependency (for users compiling modules), but here we're not getting rid of it so fast. PowerShell is not a bad option either, if more people prefer it I'm also ok with it.

The main thing is: can you really make it more concise, keeping the same syntax, and test it well? There's a lot of logic built into it that we can't discard, and to end up with something equally complex but in another language doesn't make much sense to me. Something simpler and easier to change would be welcome though.

If you can, while developing, make one commit that translates vcbuild to python/powershell exactly, and any changes in separate commits on top of it. This would make reviewing much easier and we can squash when landing. Thanks for your effort on this!

@refack
Copy link
Contributor Author

refack commented Apr 12, 2017

The main thing is: can you really make it more concise, keeping the same syntax, and test it well? There's a lot of logic built into it that we can't discard, and to end up with something equally complex but in another language doesn't make much sense to me. Something simpler and easier to change would be welcome though.

Powershell is at least a structured language, and has better dev tools from the ISE to Powershell for VSCode
As for testing, should be managable, since it's output are just calls to other tools, I don't have to actually test to final output, just that the calls are the same.

If you can, while developing, make one commit that translates vcbuild to python/powershell exactly, and any changes in separate commits on top of it. This would make reviewing much easier and we can squash when landing. Thanks for your effort on this!

I'll take a crack at it

@refack
Copy link
Contributor Author

refack commented Apr 12, 2017

The cons of Python doesn't look very relevant to me: in node-gyp it would be nice to remove it as a dependency (for users compiling modules), but here we're not getting rid of it so fast. PowerShell is not a bad option either, if more people prefer it I'm also ok with it.

My initial intuition was python, then @gibfahn made me think of JScript over cscript. Didn't imagine the popular vote would be Powershell, but that's cool as well.

@refack
Copy link
Contributor Author

refack commented Apr 12, 2017

@vsemozhetbyt
Copy link
Contributor

A strange idea: #12425 (comment)

@aqrln aqrln mentioned this issue Apr 17, 2017
2 tasks
@gdams
Copy link
Member

gdams commented Apr 25, 2017

I'm definitely pro using powershell here...

@Trott
Copy link
Member

Trott commented Mar 9, 2018

@refack Same question as the other PR: Still in progress? Should this remain open? Removing discuss label but feel free to put it back if you think it should stay.

@Trott Trott removed the discuss Issues opened for discussions and feedbacks. label Mar 9, 2018
@gibfahn
Copy link
Member

gibfahn commented Mar 9, 2018

Still in progress? Should this remain open?

I think the discussion is done, we know what needs to be done, it just needs someone to put the time in and raise a PR.

Still worth doing though, so worth leaving open.

@pd4d10
Copy link
Contributor

pd4d10 commented Dec 5, 2019

Powershell +1. If no one takes this I would like to give it a try.

@jasnell
Copy link
Member

jasnell commented Jun 25, 2020

There's been no activity here in a long time and it's not clear if it's moving forward. Refactoring the windows build, however, is still a good thing to do. Closing, but I've added this to the Futures project board so that it doesn't get lost.

@jasnell jasnell closed this as completed Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform. wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants