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

slight modifications so it works on Windows ` #76

Open
gedw99 opened this issue Jan 27, 2023 · 6 comments
Open

slight modifications so it works on Windows ` #76

gedw99 opened this issue Jan 27, 2023 · 6 comments

Comments

@gedw99
Copy link

gedw99 commented Jan 27, 2023

Just wanted to see if there is any interest in supporting windows ?

for example

DESTDIR =
ifeq ($(shell uname -s),Darwin)
	PREFIX = /usr/local
else
	PREFIX = /usr
endif

There are a few other places like where awk and grep are calls.
There are golang equivalents of these out there that i have been using and so can help contrib.

Then the CI can run matrix on windows also.

@gedw99
Copy link
Author

gedw99 commented Jan 27, 2023

AWK replacement :

https://github.com/benhoyt/goawk

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 27, 2023

Just wanted to see if there is any interest in supporting windows ?

No, generally not. Our workflow on Windows is to use WSL or ssh into a linux VM.

There are golang equivalents of these out there that i have been using and so can help contrib.

We are using the gnu or bsd variants locally and there are most likely some minor differences, which we don't potentially want to work around.

@SuperSandro2000 SuperSandro2000 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2023
@majewsky
Copy link
Contributor

majewsky commented Jan 27, 2023

To add to what Sandro said, our main challenge in adding native Windows support would be to keep it working in the future, since we don't have any systems to test on.

Also, and this is potentially a naive question from my side, how do Makefiles work on Windows anyway? Windows does not come with a make. The only way I've seen make run on Windows (besides WSL or VMs) is something like Cygwin, at which point you have a standard Unix userland anyway.

@gedw99
Copy link
Author

gedw99 commented Jan 27, 2023

@majewsky
Make files work perfectly on windows.

Here is an example:
https://github.com/amplify-edge/booty

It means your CI calls a makefile. Same dependencies on laptop and in CI.
here is an example: https://github.com/amplify-edge/booty/blob/master/.github/workflows/ci.yml#L50

  • runs on all desktops and servers fine.

The advantage is that a dev can run the makefile and he CI will run exactly the same thing. so we don't get the old works on my laptop !! §&$%$"

Booty is called by other repos make and hence their CI to install dependencies. so now their CI works and the exact same thing happens on a devs laptop. Its turtles all the way down...
https://github.com/amplify-edge/booty/blob/master/README.md#installation

@majewsky majewsky reopened this Jan 27, 2023
@majewsky
Copy link
Contributor

Ok, in that case I want to understand the scope better. Based on the $(shell ...) invocations that we currently have?

  • Is uname available on Windows? If not, how do we do OS detection?
  • Is date available on Windows? If not, what's the alternative?
  • For all of these alternatives (including goawk instead of awk), how do we switch to them? Presumably via an OS detection thing.

What I would certainly consider to be out of scope is having code in our generate Makefiles for installing coreutils replacements like goawk. As said above, we have no interest in specific testing coverage for Windows, so this code would just be dead weight to us.

@gedw99
Copy link
Author

gedw99 commented Jan 27, 2023

i am not on windows. am on Mac.

https://github.com/amplify-edge/main/blob/master/Makefile#L2

ifeq ($(OS),Windows_NT)
	BOOTY_URL:=$(BOOTY_URL)/install.ps1
else
	BOOTY_URL:=$(BOOTY_URL)/install.sh
endif

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

No branches or pull requests

3 participants