Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Build fails on Windows due to git-utils. #34

Open
hedefalk opened this issue Jan 25, 2016 · 7 comments
Open

Build fails on Windows due to git-utils. #34

hedefalk opened this issue Jan 25, 2016 · 7 comments

Comments

@hedefalk
Copy link

Upstream issue for us on https://github.com/ensime/ensime-atom:

ensime-atom -> scandal -> git-utils fails with node-gyp errors on Windows:

https://github.com/ensime/ensime-atom/issues/112#issuecomment-174500613

@hedefalk
Copy link
Author

Sorry if this is a known issue and not a bug. Is Python on PATH a requirement for Windows? A bit hard for me to find info, but since this is a project under atom org I thought it probably was safe to use as a dependency without risking platform issues.

@lee-dohm
Copy link
Contributor

@hedefalk I don't have a Windows build environment to verify this on, but I'm pretty sure that Python v2.7 on the PATH is a requirement (along with the other requirements listed in the Atom Windows build requirements).

@hedefalk
Copy link
Author

@lee-dohm Ok, cool!

But what does this mean for me as a package developer? That I can't depend on scandal at all or that I have to do some kind of pre-cross-build thing first? I mean, this breaks for users of my package on Windows. But scandal is used by atom's internal file search features too, right? So there has to be some kind of pre-building going on then? Is it possible for me to achieve the same with apm as a package author?

Up until now I have just added any kind of npm dependency I needed and everything just works… Have I missed something in the docs?

@maxbrunsfeld
Copy link
Contributor

@hedefalk Yeah, a python interpreter is required for installing most node modules that use C or C++ code, because node uses gyp as part of its build system. For users that don't have python, a decent number of packages will fail to install.

That said, it is possible to publish node modules with their native components pre-compiled for all platforms. In Atom, we are currently switching to a different git module, nodegit, which does this. So pretty soon, we will update scandal to use nodegit, and if you upgrade to the latest version of scandal, the user who reported the issue will be able to install your package.

@hedefalk
Copy link
Author

@maxbrunsfeld Cool! Is there a known timeframe for that? Depending on days vs weeks I might just need to remove the dependency on scandal and use something else in the meantime. I just used it for some super simple file searching task that I could probably do with just fs in the meantime…

@hedefalk
Copy link
Author

@maxbrunsfeld Just one more question though so I understand: scandal IS used internally by the pre-packagade modules of atom, right? Is this solved there in another way? Not something I could mimic easily myself in the meantime?

@maxbrunsfeld
Copy link
Contributor

Yeah, scandal is used by Atom, but when a user downloads Atom they get a binary that is pre-compiled for their platform. It is possible to do this for any node module, but it requires some work, and it would mean changing git-utils to use node-pre-gyp. Soon, this particular problem will be addressed by our switching to nodegit, which already does this.

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

No branches or pull requests

3 participants