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

Windows Batch is horrible; PowerShell is nicer #252

Closed
nmigen-issue-migration opened this issue Oct 13, 2019 · 7 comments
Closed

Windows Batch is horrible; PowerShell is nicer #252

nmigen-issue-migration opened this issue Oct 13, 2019 · 7 comments

Comments

@nmigen-issue-migration
Copy link

Issue by emilazy
Sunday Oct 13, 2019 at 13:16 GMT
Originally opened as m-labs/nmigen#252


It would be nice to have less horrifying build scripts, especially as they increase in complexity due to #251 and similar.

@nmigen-issue-migration
Copy link
Author

Comment by whitequark
Sunday Oct 13, 2019 at 13:16 GMT


I wouldn't be the one to implement this. I would accept a PR implementing this though.

@whitequark
Copy link
Member

@emilazy Do you recall if there are any specific benefits from migrating to PowerShell, i.e. things we could not do before at all but could do after? I'm wary of a situation where I have to maintain three script generators because it turns out that some obscure but necessary configuration breaks PowerShell.

Batch files are awful, sure, but they do work, and migration infers a cost (both upstream and downstream) that should jutsify itself.

@whitequark
Copy link
Member

some obscure but necessary configuration breaks PowerShell

(I bet someone will try running batch files under wine cmd or something horrible like that...)

@programmerjake
Copy link
Contributor

(I bet someone will try running batch files under wine cmd or something horrible like that...)

:) report bugs to Wine, they will eventually get fixed (I fixed some myself). Also, if it works with Wine, it makes testing from Linux quite a bit easier.

@whitequark
Copy link
Member

@programmerjake I assume batch files would work just fine under wine (I found wine cmd quite accurate). But I don't think wine has powershell by default. That would be one reason to stay on batch files.

@emilazy
Copy link
Contributor

emilazy commented Apr 14, 2020

The Batch language probably has fundamental deficiencies with regards to things like filenames with spaces in them, but I don't know if any of them will really matter for nmigen.

On Linux or Wine you could probably use PowerShell Core, I guess? It's free software, which is more than can be said of the Batch interpreter.

That said, I think this was written when I was trying to move a bunch of logic from Python to build scripts, which ended up not happening, so you can close it if you'd like.

@whitequark
Copy link
Member

The Batch language probably has fundamental deficiencies with regards to things like filenames with spaces in them, but I don't know if any of them will really matter for nmigen.

nMigen explicitly forbids spaces (really, all non-alphanumeric characters) in filenames that it produces itself (e.g. the design name; the one that is top by default) for a simple reason: vendor toolchains don't handle them well. (People can still create such filenames explicitly, e.g. via platform.add_file.) Although I think handling such filenames does matter in principle, it seems like a lost cause given that a significant part of nMigen userbase will use it with third party software that I know will break on paths with spaces.

In other words, my judgement is that the benefits (improved path handling, language that's fit for its purpose) does not justify the drawbacks (churn in build scripts, added complications for wine users). I am open to reevaluating this in the future, but I think for now we should stick with batch files.

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

No branches or pull requests

4 participants