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

[internal] get the reason bspack build script working with esy #2153

Closed
wants to merge 33 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8f195cf
almost to jsoo
jaredly Aug 21, 2018
e660347
gettin it workin
jaredly Aug 21, 2018
1675c55
working with esy
jaredly Aug 21, 2018
79fa2cc
ignore
jaredly Aug 21, 2018
a9925c5
cleanup
jaredly Aug 21, 2018
d118601
more cleanup
jaredly Aug 21, 2018
b9f17a8
more cleanup
jaredly Aug 21, 2018
d4461ad
version default
jaredly Aug 21, 2018
9677c52
locks
jaredly Aug 21, 2018
5eb1090
vendor bspack
jaredly Aug 21, 2018
e876003
missed that too
jaredly Aug 22, 2018
a912b5e
cleanup
jaredly Aug 22, 2018
4c709b3
gnu sed
jaredly Aug 22, 2018
1aca9a2
fix version number
jaredly Sep 12, 2018
22a520c
Merge branch 'master' into joo. Conflicts: bspacks/reason_bspack.sh
jchavarri Nov 24, 2019
23d08c1
Add ppx_derivers to bspacks deps
jchavarri Nov 25, 2019
28e4c96
Fix paths to esy sandbox
jchavarri Nov 25, 2019
1d05e43
Native build passing
jchavarri Nov 25, 2019
7b335f1
Fix refmt_js api
jchavarri Nov 26, 2019
d667cb8
Merge pull request #2 from jchavarri/joo
jaredly Nov 27, 2019
e92ca99
quiet esy.lock
jaredly Nov 28, 2019
9c0248d
get bspack.ml from github
jchavarri Nov 28, 2019
74e623a
actually remove bspack and fix paths
jchavarri Nov 28, 2019
20a8f01
Merge pull request #3 from jchavarri/joo
jaredly Nov 30, 2019
6a8a441
Merge branch 'master' into joo
jaredly Dec 2, 2019
a56fc71
igonre output directory
jaredly Dec 2, 2019
5b79c17
use sandboxes! yay
jaredly Dec 2, 2019
b5d3aef
rm old
jaredly Dec 2, 2019
458baa1
Merge branch 'master' into joo
jaredly Dec 12, 2019
fd11d9d
simplify
jaredly Dec 12, 2019
654f582
generated
jaredly Dec 12, 2019
dbd1034
undo that
jaredly Dec 12, 2019
e3eec8a
do the prerelease thing
jaredly Dec 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
jaredly committed Aug 21, 2018
commit a9925c537e5aa32481efcd783cf56e132293864d
17 changes: 7 additions & 10 deletions bspacks/reason_bspack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ set -e
# this script does 2 independent things:
# - pack the whole repo into a single refmt file for vendoring into bucklescript
# - generate the js version of refmt for web usage
esy i
esy b

THIS_SCRIPT_DIR="$(cd "$( dirname "$0" )" && pwd)"

# command -v dune || { echo "Dune not found. If you're using esy, do 'esy ./reason_bspack.sh'"; exit 1; }
cd $THIS_SCRIPT_DIR

esy i
Copy link
Member

@jordwalke jordwalke Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

I had the same idea a while ago (to automate the CI via esy). Glad you're doing it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't

esy install
esy build

the same as just esy now? But I maybe we want it more explicit?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. However, we might find some issues with the esy=esy i && esy b shortcut so it's good to be explicit in case it changes.

esy b

# echo "**This script is switching you to ocaml 4.02.3 for the subsequent bspacking. Please switch back to your own version afterward. Thanks!**\n"
# opam switch 4.02.3
# eval $(opam config env)
# Because OCaml 4.02 doesn't come with the `Result` module, it also needed stubbing out.
resultStub="module Result = struct type ('a, 'b) result = Ok of 'a | Error of 'b end open Result"

Expand All @@ -22,8 +20,6 @@ menhirSuggestedLib=`esy menhir --suggest-menhirLib`
esy build-env node_modules/@opam/ocaml-migrate-parsetree > _get_root
echo >> _get_root
echo 'echo $cur__root' >> _get_root
# generated from the script ./downloadSomeDependencies.sh
# ocamlMigrateParseTreeTargetDir="$THIS_SCRIPT_DIR/ocaml-migrate-parsetree/_build/default/src"
ocamlMigrateParseTreeTargetDir=`cat _get_root | bash`/_build/default/src
rm _get_root

Expand All @@ -44,9 +40,10 @@ rm -rf $buildDir
mkdir $buildDir

pushd $THIS_SCRIPT_DIR
# rebuild the project in case it was stale

# rebuild the project in case it was stale
cd ..
# We need 4.02 for js_of_ocaml (it has a stack overflow otherwise :/)
sed -i '' 's/"ocaml": "~4.6.0"/"ocaml": "~4.2.3004"/' ./esy.json
make pre_release
esy install
Expand All @@ -64,7 +61,7 @@ mv $i ${target}
done;
ocamlMigrateParseTreeTargetDir=$THIS_SCRIPT_DIR/build/omp

# Build ourselves a bspack.exe
# Build ourselves a bspack.exe if we haven't yet
if [ ! -f $THIS_SCRIPT_DIR/bspack.exe ]; then
echo "👉 building bspack.exe"
cd $THIS_SCRIPT_DIR/bin
Expand Down