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

Fixes #3843 #3850

Merged
merged 3 commits into from
Oct 1, 2019
Merged

Fixes #3843 #3850

merged 3 commits into from
Oct 1, 2019

Conversation

bikallem
Copy link
Contributor

Fixes #3843 by using nodejs fs.copyFileSync to copy pre-built compilers instead of using ninja.exe. Since ninja.exe is classed as trojan by many anti-virus software.

Fixes #3843 by using nodejs fs.copyFileSync to copy pre-built compilers instead of using ninja.exe. Since ninja.exe is classed as trojan by many anti-virus software.
@bikallem
Copy link
Contributor Author

Could we perhaps have another release after this is merged?

@bobzhang
Copy link
Member

How does this solve your problem? ninja.exe will still be running after installation.
My concern is that fs.copyFileSync is a pretty new API

@bikallem
Copy link
Contributor Author

bikallem commented Sep 26, 2019

The anti-virus seems to be triggered only when we run ninja.exe via cp.execFileSync. I suspect this is so because of the copy rule we define in copy.ninja. Specifically,

rule cp
    command = cmd /q /c copy $in $out 1>nul

where a child process spawns a shell which in turn triggers anti-virus software into thinking this is some kind of malware. Other cases of ninja.exe seems to be okay and not trigger the anti-virus. I tried the new install.js script and all versions of bs-platform install successfully, i.e. 5.1.0/5.2.0 and 6.1.0. These were all failing before. My colleagues are also able to install bs-platform correctly with the new install.js.

We will probably experience these use-cases more in corporate environments which is usually locked-down under proxy servers and security policies. So perhpas catering to these use-cases is better for the adoption of bs-platform in general.

Re: 'fs.copyFileSync' it is available in nodejs after v8.5.0. What is the lowest version of nodejs that bs-platform targets? Are you open to this route though?

@bobzhang
Copy link
Member

Yeah, I am okay to this move except that fs.copyFileSync requires us to set the minimum version to 8, but I think it is fine to take this solution on windows, can you guard this pattern only for Windows users?

@bikallem
Copy link
Contributor Author

Sure. will do

Splits copyPrebuiltCompilers() into copyPrebuiltCompilersForWindows() and copyPrebuiltCompilersForUnix() so that install on windows doesn't trigger anti-virus software.
@bikallem
Copy link
Contributor Author

bikallem commented Oct 1, 2019

@bobzhang This is ready. Tested 5.2.0 and 6.2.0 on windows and installs correctly.

@bobzhang bobzhang merged commit 7cea069 into rescript-lang:master Oct 1, 2019
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

Successfully merging this pull request may close these issues.

5.2.0/6.1.0 fails to install on windows
2 participants