<_whitenotifier>
[nmigen] emilazy opened issue #252: Windows Batch is horrible; PowerShell is nicer - https://git.io/Je8fi
<_whitenotifier>
[nmigen] whitequark commented on issue #252: Windows Batch is horrible; PowerShell is nicer - https://git.io/Je8fX
<cr1901_modern>
emily: I think ultimately the reason powershell isn't used is historical; migen originally didn't support Windows w/o bash at all, and I know jack about powershell. So it just stuck when I implemented it in 2015 or so.
<cr1901_modern>
Honestly, I still don't enjoy using powershell at all
<whitequark>
the reason nmigen doesn't use powershell is that i forgot it exists
<cr1901_modern>
Tbh, I can't remember if it comes standard on all versions of 7/10 (not that 7 will matter in a few months)
<whitequark>
starting with 7 SP1
<cr1901_modern>
ahhh cool.
<emily>
I find powershell more usable because it has aliases for the linux commands I'm used to :v
<emily>
but mostly it's just like, not a trash fire as a scripting language
<cr1901_modern>
Well nobody's gonna argue w/ ya there
<cr1901_modern>
(I hope)
<emily>
template = \
<emily>
"if [%{env_var}%] eq [] set {env_var}={name}"
<emily>
"if [%{env_var}%] eq [""] set {env_var}=\n" \
<emily>
wow nice lack of escaping me
<emily>
subtle bug
<cr1901_modern>
if it "just works" from either a cmd.exe or bash prompt on Windows, I have no preference.
<cr1901_modern>
calling a batch script from a bash prompt on Windoze surprisingly enough works
<ZirconiumX>
So, I've been trying to test native-windows nmigen
<ZirconiumX>
Predictably, it could be going much better
<whitequark>
oh?
mumptai has joined #m-labs
<ZirconiumX>
Windows bullshittery
<ZirconiumX>
On the other hand I did notice that there's now a QUARTUS_ROOTDIR environment variable
<ZirconiumX>
Which might be useful for trying to locate Quartus
<tpw_rules>
it's not always right
<ZirconiumX>
"might" be useful
<tpw_rules>
i ran into a problem where i installed things in the wrong order or something and it wasn't set right and broke the SoC EDS
<tpw_rules>
yes. might
* ZirconiumX
gives up and goes back to WSL
<whitequark>
huh?
<ZirconiumX>
Native windows is painful
<ZirconiumX>
Especially in a world that relies mostly on the existence of Unix tools
<ZirconiumX>
For example, nmigen is not yet on PyPI, so to get it, you have to download Git
<ZirconiumX>
Except that nmigen depends on bitarray, so you now need Visual Studio Build Tools to compile that
<whitequark>
right
<whitequark>
there's an issue about that
<ZirconiumX>
And then it depends on Yosys, which needs GCC/Clang and GNU Make
<ZirconiumX>
So now you need to use MinGW
<ZirconiumX>
So now you have two different toolchains for the dependencies of nmigen
<whitequark>
right.
<whitequark>
that sucks.
<whitequark>
i'm probably going to put yosys on PyPI as a wheel or something.
<cr1901_modern>
I don't have a problem w/ requiring MinGW for compiling. But _using_ nmigen should not require MSYS2
<whitequark>
it doesn't require MSYS2.
<cr1901_modern>
requiring MSYS2* for compiling
<cr1901_modern>
point blank is you shouldn't need any of the *nix tools just to use nmigen
<whitequark>
well, you can convince clifford to use cmake instead
<whitequark>
i'm sure that will go well
<cr1901_modern>
Yea I know
<cr1901_modern>
He already rejected making the build system use Meson
<cr1901_modern>
b/c of chronic NIH syndrome
<ZirconiumX>
I'm just listing my "first time user on native Windows" experience
<whitequark>
cr1901_modern: that's pretty rue
<whitequark>
*rude
<cr1901_modern>
It's not just yosys, it's symbiyosys and yosys-smtbmc too
<whitequark>
i could as well say that microsoft has chronic NIH syndrome and should have just used POSIX :p
<cr1901_modern>
Okay fine, that was mean
<ZirconiumX>
whitequark: Depending on your point of view, WSL or any of its precursors could count as that :P
<cr1901_modern>
I'm not maintaining a WSL version of nmigen. There's too many permutations of possible "get all your *nix deps on a Windows machine" to possibly support them all.
<cr1901_modern>
The only two I really want to support are: *native without _any_ *nix tools, and MSYS2
<cr1901_modern>
The MSYS2 variant can use pacman to get yosys/nextpnr/etc
<ZirconiumX>
To be honest, cr1901_modern, as a WSL user, I think WSL should be treated as if it was Linux
<cr1901_modern>
ZirconiumX: Fair enough/agreed.
<ZirconiumX>
I very happily use nmigen under WSL, and the only thing I've had to do is put stub shell scripts to invoke the actual Windows binaries of Quartus
<ZirconiumX>
Other than that it Works Fine
<daveshah>
I'm sure there was a Visual Studio project for Yosys
<cr1901_modern>
there is, but Idk how up to date it is
<cr1901_modern>
anyways, it is genuinely on my todo list to get yosys/nextpnr-git into msys2 pacman repos
<cr1901_modern>
in the near future
<daveshah>
Well, there is one for 0.9
<daveshah>
I think there is a script or something that creates it, iirc
<cr1901_modern>
So anyone who already has msys2 just needs to pacman install
<cr1901_modern>
Anyone who doesn't can use wq's PyPi package
<cr1901_modern>
(I didn't even know you could upload primarily non Python stuff to PyPi)
<whitequark>
i mean, who's gonna stop me?
<whitequark>
python cops?
<cr1901_modern>
keystone cops?
* ZirconiumX
hears sirens outside
<cr1901_modern>
Does this reference pass over everyone's head?
<whitequark>
i'm totally opposed to supporting cygwin in any way
<whitequark>
it's an abomination that needs to just die
<cr1901_modern>
whitequark: Sure, fine with me
<cr1901_modern>
Like I said, this was 2 years ago
<cr1901_modern>
None of the MiSoC stuff applies either at present in that gist, it's just a good way to gather my thoughts
<cr1901_modern>
>I very happily use nmigen under WSL, and the only thing I've had to do is put stub shell scripts to invoke the actual Windows binaries of Quartus
<cr1901_modern>
Should you commit those stub shell scripts, or does this fall under the environment that nmigen will invoke just before doing a build?
<cr1901_modern>
ZirconiumX: ^
<ZirconiumX>
The latter
<ZirconiumX>
nmigen calls quartus_map
<ZirconiumX>
Which expands to one of my shell scripts
<whitequark>
you can override that in the environment
<whitequark>
set NMIGEN_ENV_Quartus
<whitequark>
that could set QUARTUS_MAP to your script or w/e
<whitequark>
or just use the right path
<ZirconiumX>
I have it in .local/bin so it's not like I'm polluting /bin or whatever
mumptai has quit [Quit: Verlassend]
<whitequark>
I mean, it's just easier to have one script instead of like five
<ZirconiumX>
Maybe, but copy/pasting a two-line shell script is no big deal to me
mumptai has joined #m-labs
<ZirconiumX>
Besides, I'm actually pretty sure I could make it one shell script with some symlinking
<ZirconiumX>
Anyway, that's ricing for another time
<ZirconiumX>
I prefer the shell scripts because for things like Mistral I need to invoke Quartus outside nMigen anyway
<cr1901_modern>
The environment script is a compromise anyway- user has to do a bit of work for each machine they need to use nmigen on, but after that it "just works"
<cr1901_modern>
previously, omigen tried to be intelligent about finding deps
<cr1901_modern>
and binaries*
<cr1901_modern>
daveshah: I wasn't aware the VC build was up to date, tbh. I think that basically renders my complaints null and void.
<whitequark>
yeah and it was stupid instead
<whitequark>
it didn't actually work
<whitequark>
it also completely broke with remote builds, which is why it never had remote builds
<cr1901_modern>
I did say "tried" :)
cr1901_modern has quit [Read error: Connection reset by peer]
bradbqc_mobile has quit [Quit: Connection closed for inactivity]
cr1901_modern has joined #m-labs
mumptai has quit [Quit: Verlassend]
<cr1901_modern>
whitequark: For ISE, the environment broke: http://ix.io/1YyL Almost certainly I'm doing something obviously wrong. Brb
<cr1901_modern>
I think perhaps in the mid future if travis ever gets their Windoze shit together, there should be some Windows-only tests which ensures variables are being honored and the batch scripts are properly running. >>
<cr1901_modern>
It would be a stub platform whose sole purpose is to print out the env or something