- Notifications
You must be signed in to change notification settings - Fork 471
Build with esy #3825
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
Build with esy #3825
Changes from all commits
0b8f847 e507ad1 0e270b5 4bba928 138566e 20f6f9f ff81596 9213579 9856631 8abe4d6 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| *~ | ||
| _build | ||
| _esy | ||
| *.exe | ||
| *.obj | ||
| *.out | ||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| { | ||
| "name": "bs-platform", | ||
| "version": "5.2.0-dev.2", | ||
| "dependencies": { | ||
| "ocaml": "4.02.3000+BS" | ||
| }, | ||
| "devDependencies": { | ||
| "ocaml": "4.02.3000+BS" | ||
| }, | ||
| "resolutions": { | ||
| "ocaml": "ulrikstrid/ocaml:package.json#e433d5b3fbe8963ac98257d1ed3b32c01515e07d" | ||
| }, | ||
| "esy": { | ||
| "buildsInSource": true, | ||
| "build": [ | ||
| ["node", "./scripts/install.js"], | ||
| ["cp", "-r", "-f", "#{self.root / 'bsconfig.json'}", "#{self.install}"], | ||
| ["cp", "-r", "-f", "#{self.root / 'esy.json'}", "#{self.install}"], | ||
| ["cp", "-r", "-f", "#{self.root / 'package.json'}", "#{self.install}"], | ||
| ["cp", "-r", "-f", "#{self.root / 'jscomp'}", "#{self.install}"], | ||
| ["cp", "-r", "-f", "#{self.root / 'lib'}", "#{self.install}"], | ||
| ["cp", "-r", "-f", "#{self.root / 'scripts'}", "#{self.install}"], | ||
| ["cp", "-r", "-f", "#{self.root / 'vendor'}", "#{self.install}"] | ||
| ], | ||
| "buildEnv": { | ||
| "ESY": "true" | ||
| }, | ||
| "exportedEnv": { | ||
| "OCAMLLIB": { | ||
| "val": "#{self.lib / 'ocaml' }", | ||
| "scope": "global" | ||
| }, | ||
| "CAML_LD_LIBRARY_PATH": { | ||
| "val": "#{self.lib / 'ocaml' / 'stublibs' : self.lib / 'ocaml' : $CAML_LD_LIBRARY_PATH}", | ||
| "scope": "global" | ||
| }, | ||
| "OCAML_TOPLEVEL_PATH": { | ||
| "val": "#{self.lib / 'ocaml' }", | ||
| "scope": "global" | ||
| }, | ||
| "bs_custom_resolution": { | ||
| "val": "true", | ||
| "scope": "global" | ||
| }, | ||
| "bs_platform__install": { | ||
| "val": "#{self.install}", | ||
| "scope": "global" | ||
| }, | ||
| "PATH": { | ||
| "val": "#{self.lib : $PATH}", | ||
| "scope": "global" | ||
| } | ||
| } | ||
| }, | ||
| "description": "bucklescript compiler for use in esy, ocaml standard libary by bucklescript and its required runtime support", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/bucklescript/bucklescript.git" | ||
| }, | ||
| "keywords": ["ocaml", "bucklescript", "stdlib", "functional programming"], | ||
| "author": { | ||
| "name": "Hongbo Zhang" | ||
| }, | ||
| "maintainers": [ | ||
| { | ||
| "name": "hongbo_zhang", | ||
| "email": "bobzhang1988@gmail.com" | ||
| } | ||
| ], | ||
| "license": "SEE LICENSE IN LICENSE", | ||
| "bugs": { | ||
| "url": "https://github.com/bucklescript/bucklescript/issues" | ||
| }, | ||
| "homepage": "https://github.com/bucklescript/bucklescript#readme" | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -310,14 +310,17 @@ function provideCompiler() { | |
| return myVersion; | ||
| } else { | ||
| myVersion = require("./buildocaml.js").getVersionPrefix(); | ||
| var ocamlopt = path.join( | ||
| __dirname, | ||
| "..", | ||
| "native", | ||
| myVersion, | ||
| "bin", | ||
| "ocamlopt.opt" | ||
| ); | ||
| var ocamlopt = | ||
| process.env.ESY === "true" | ||
| ? "ocamlopt.opt" | ||
| : path.join( | ||
| __dirname, | ||
| "..", | ||
| "native", | ||
| myVersion, | ||
| "bin", | ||
| "ocamlopt.opt" | ||
| ); | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lgtm | ||
| if (!fs.existsSync(ocamlopt)) { | ||
| require("./buildocaml.js").build(true); | ||
| } else { | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need maintain this, if so, which other fields do we need watch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for "dependencies", "devDependencies", "resolutions" and "esy" it's a copy of the normal
package.json, I think we could just remove most fields if we don't want them here.