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

Fixed hbytes compare #11610

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
e182eab
Remove non existent luautf8 charCodeAt extern (#11097)
tobil4sk Apr 9, 2023
691bcb6
[pcre] Fix bytecode bindings issues (#11098)
tobil4sk Apr 8, 2023
f525643
Fix AtomicInt warnings on cppia. (#11105)
Apprentice-Alchemist Apr 9, 2023
b357b15
[cpp] Add white space around template type syntax (#11107)
Aidan63 Apr 9, 2023
3b9172d
[macro] run static local transformation
Simn Apr 8, 2023
ee623c3
[typer] check abstract casts against int on OpInterval
Simn Apr 11, 2023
0789ec4
[java] don't check native signatures on extern functions
Simn Apr 13, 2023
c574d8a
support deprecation for defines
Simn Apr 13, 2023
7abc3bd
[typer] bring back some deprecation checks that we forgot about
Simn Apr 13, 2023
616a3ee
[server] print times when flushing
Simn Apr 13, 2023
e6e242b
remove global values from deprecation handling (#11134)
Simn Apr 13, 2023
8f3edfe
remove pycache from git
andyli Apr 13, 2023
1400d5a
[tests] lose binaries
Simn Apr 13, 2023
cf96953
[tests] manually create res2.bin
Simn Apr 14, 2023
e90e32d
[parser] fix ?? precedence
Simn Apr 14, 2023
bc0d4bc
document `brew install mbedtls@2`
andyli Apr 14, 2023
0c72503
Happy new year!
kLabz Apr 15, 2023
03925f7
[4.3_bugfix] Namespace message reporting defines (#11142)
kLabz Apr 15, 2023
b6d9e55
[typeload] lazyfy default type parameter loading
Simn Apr 18, 2023
2a7ff13
Update to ocaml 4.08.1 and luv 0.5.12
kLabz Apr 28, 2023
017b498
Update windows makefile
kLabz Apr 28, 2023
964c84c
Release 4.3.1
kLabz Apr 28, 2023
c6cefd9
Dont check `return expr` in assignments (#11114)
RblSb Apr 11, 2023
e3f55b0
Do not raise final assign in display (#11200)
RblSb May 5, 2023
ab27cfa
Handle EField kind (#11204)
RblSb May 6, 2023
9ea1120
Support @:haxe.warning options for @:enum deprecation warning
kLabz May 7, 2023
0482ebc
Use WDeprecatedEnumAbstract for @:enum deprecation warnings
kLabz May 7, 2023
f9a7072
Allow non constant "inline" var init with -D no-inline (#11192)
kLabz Apr 29, 2023
6e77ae1
Macro generated EVars position fixes (#11163)
kLabz Apr 27, 2023
1cbfdcc
Fix Printer EField again (#11206)
RblSb May 7, 2023
f05c5fb
[pretty errors] fix stack overflow
kLabz May 17, 2023
5a51513
[eval] Fix MainLoop.add not repeating (#11202)
kLabz May 16, 2023
611e1cb
[hl/eval/neko] Fix exception stack when wrapping native exceptions (#…
kLabz Jul 5, 2023
4a52da2
[typer] don't infer Null<?> if it already is Null<?>
Simn Aug 31, 2023
38e8d94
Make break/continue exprs not-nullable (#11269)
RblSb Jul 5, 2023
17cf98c
[macro] add flags to TDAbstract to be able to construct enum abstract…
kLabz Jul 4, 2023
0227f28
[macro] Fix abstract casts for local statics (#11301)
kLabz Aug 31, 2023
23e46b5
[typer] map `this` when restoring typed expressions
Simn Aug 31, 2023
6c18eb8
Bring back forced inline (#11217)
kLabz May 13, 2023
cbfaa5f
[ci] update CI from development
kLabz Aug 31, 2023
75ee99c
[skip ci] Update changelog
kLabz Sep 1, 2023
0f45df6
[skip ci] changelog wording
kLabz Sep 1, 2023
39960a1
Fix `??` inference and precedence (#11252)
RblSb Jun 13, 2023
fb1dee7
Follow forwardStatics abstract (#11294)
RblSb Aug 14, 2023
52008b1
[skip ci] update changelog
kLabz Sep 1, 2023
a6ac3ae
Release 4.3.2
kLabz Sep 1, 2023
87ada5e
OCaml 5 compatibility (#11272)
kLabz Sep 14, 2023
e4a4071
Make genhl respect Meta.NoExpr. (#11257)
Apprentice-Alchemist Jul 4, 2023
49bb2da
[hl] don't add bindings for non existing methods
kLabz Sep 25, 2023
643086a
Forward metadata for static local vars
kLabz Sep 7, 2023
f00c71a
[server] Better error messages for --connect
kLabz Sep 8, 2023
d6d0cdc
[macro] Printer: do not break for TDAbstract without flags
kLabz Sep 8, 2023
f6281c2
[compiler] improve error message when hl_version is missing
Simn Aug 8, 2023
98b21e4
[eval,hl] fix catching value exceptions
kLabz Sep 28, 2023
b14f8c8
[eval] fix Array.resize retaining values
Simn Sep 25, 2023
fd8412b
[hlc] add bool to reserved keywords
kLabz Sep 15, 2023
c8113b8
DOMElement insertAdjacentElement should not be pure. (#11333)
simon-peek-poke Oct 16, 2023
d52937e
Improve extra field error range (#11335)
RblSb Oct 18, 2023
7b5041f
Fix macOS CI (#11359)
Apprentice-Alchemist Nov 5, 2023
2c671fb
[error reporting] handle non existing files for positions
kLabz Nov 14, 2023
08bb8c1
[java,cs] fix stack overflow from closures constraints (#11350)
kLabz Oct 27, 2023
aaf3a97
[hlc] I64 mod support
kLabz Sep 15, 2023
29a42ba
[display] Config to disable populating cache from display requests (#…
kLabz May 15, 2023
38c4d0c
[macro] Update macro API restriction warnings (when using -D haxe-nex…
kLabz Nov 15, 2023
c988f89
[parser] check for Eof
Simn Nov 10, 2023
4dc2429
[tests] fix and add
Simn Nov 13, 2023
9df1e9a
update changelog
kLabz Nov 15, 2023
55ea42b
[ci] Enable missing hashlink tests (#11064)
tobil4sk Apr 10, 2023
3641817
[hl/c] Run (and fix) unit tests for hl/c on linux (#11382)
kLabz Nov 16, 2023
0a35cb5
update changelog
kLabz Nov 16, 2023
e1926e0
[tests] add missing hxml
kLabz Nov 17, 2023
de28889
Release 4.3.3
kLabz Nov 17, 2023
100fcbb
[jvm] warn about --java ... -D jvm vs --jvm ...
kLabz Feb 13, 2024
880de7b
[ci] lock utest version to pre-2.0
kLabz Dec 16, 2023
0c8f65a
[ci] update dependencies
kLabz Feb 13, 2024
b81a65f
[macro] Build order vs inheritance (#11582)
kLabz Feb 16, 2024
d1f1db0
[tests] misc tests: ignore position changes for std modules
kLabz Feb 3, 2024
41407d1
[tests] improve std position hiding a bit
kLabz Feb 3, 2024
ab14c02
[tests] well ofc there's windows too..
kLabz Feb 4, 2024
cc3afee
[tests] need to escape those slashes on windows
kLabz Feb 4, 2024
c398fcd
[tests] remove test with pretty errors that brings nothing but pain
kLabz Feb 3, 2024
1736b95
Deprecate some API from haxe.macro.Compiler
kLabz Feb 3, 2024
c17e976
Dont infer string on concat (#11318)
Simn Nov 7, 2023
e252854
[typer] don't type trailing optional bind arguments so weirdly (#11533)
Simn Feb 1, 2024
4d72a67
[hl/c] fix reserved keywords (#11408)
kLabz Nov 23, 2023
0d3da4d
[parser] remove strange Error catching
Simn Nov 21, 2023
443675a
[analyzer] deal with unreachable block in binops
Simn Nov 22, 2023
7c23d8d
[analyzer] don't recursively check enum values when const propagating
Simn Dec 14, 2023
d417ee9
[typer] remove Directory package rule because it is unused
Simn Jan 9, 2024
67e7ef2
don't double-throw all exceptions
Simn Feb 6, 2024
09ccc62
[matcher] follow when looking for GADT return types
Simn Dec 24, 2023
1b3567d
[analyzer] fix check for inlined purity meta
Simn Nov 19, 2023
ddff346
fix JsonPrinter empty parent class
Simn Feb 7, 2024
2f9f6b5
avoid JS test problem
Simn Feb 7, 2024
e1bc23d
allow `@:using` with Class and Enum (#11553)
Simn Feb 7, 2024
7555427
[dce] clean up operator handling
Simn Dec 13, 2023
844dce5
[display] expose list of metadata/defines (#11399)
kLabz Nov 21, 2023
b00bca0
[typer] don't hide abstract type when resolving through @:forward
Simn Jan 30, 2024
bafb5fe
add @:forward.accessOnAbstract and use it for cs.PointerAccess
Simn Jan 31, 2024
9f8b8a2
Revert @:forward.accessOnAbstract, hack instead
Simn Jan 31, 2024
68134b4
dodge c# static type param problem
Simn Jan 31, 2024
ef29c2c
[tests] Mac cppia isn't happy there for some reason
kLabz Feb 19, 2024
a78f78a
[hl] hlopt rework try-catch control flow (#11581)
yuxiaomao Feb 26, 2024
333cc39
[display] deal with static extension hovers properly
Simn Aug 31, 2023
bc2d41e
[display inspect generated expression when displaying safe-nav
Simn Nov 18, 2023
9b9cdfc
update changelog
kLabz Mar 4, 2024
dc1a43d
Release 4.3.4
kLabz Mar 4, 2024
9ee3003
Fixed hbytes compare
onehundredfeet Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
222 changes: 123 additions & 99 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .vscode/schemas/define.schema.json
Expand Up @@ -61,6 +61,10 @@
"reserved": {
"type": "boolean",
"markdownDescription": "Reserved defines may not be defined from the command line."
},
"deprecated": {
"type": "string",
"markdownDescription": "Reason for the define to be deprecated."
}
},
"required": [
Expand Down
5 changes: 4 additions & 1 deletion Earthfile
Expand Up @@ -91,8 +91,11 @@ devcontainer:
RUN git config --global codespaces-theme.hide-status 1

# Install OCaml libraries
COPY opam .
COPY haxe.opam .
RUN opam init --disable-sandboxing
RUN opam switch create 4.08.1
RUN eval $(opam env)
RUN opam env
RUN opam install . --yes --deps-only --no-depexts
RUN opam list
RUN ocamlopt -v
Expand Down
2 changes: 1 addition & 1 deletion Makefile.win
Expand Up @@ -83,7 +83,7 @@ package_choco:
rm -rf out/choco

$(INSTALLER_TMP_DIR)/neko-win.zip: $(INSTALLER_TMP_DIR)
wget -nv https://github.com/HaxeFoundation/neko/releases/download/$(NEKO_VERSION_TAG)/neko-$(NEKO_VERSION)-win$(NEKO_ARCH_STR).zip -O installer/neko-win.zip
curl -L https://github.com/HaxeFoundation/neko/releases/download/$(NEKO_VERSION_TAG)/neko-$(NEKO_VERSION)-win$(NEKO_ARCH_STR).zip -o installer/neko-win.zip

package_installer_win: $(INSTALLER_TMP_DIR)/neko-win.zip package_win
$(eval OUTFILE := $(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_installer.zip)
Expand Down
2 changes: 1 addition & 1 deletion extra/BUILDING.md
Expand Up @@ -36,7 +36,7 @@ You need to install some native libraries as well as some OCaml libraries.
To install the native libraries, use the appropriate system package manager.

* Mac OS X
* Use [Homebrew](https://brew.sh/), `brew install zlib pcre2`.
* Use [Homebrew](https://brew.sh/), `brew install zlib pcre2 mbedtls@2`.
* Debian / Ubuntu
* `sudo apt install libpcre2-dev zlib1g-dev libmbedtls-dev`.
* Windows (Cygwin)
Expand Down
107 changes: 107 additions & 0 deletions extra/CHANGES.txt
@@ -1,3 +1,110 @@
2024-03-04 4.3.4

General improvements:

all : allow @:using with Class and Enum (#11553)
display : expose list of metadata/defines (#11399)

Bugfixes:

all : typedef vs. GADT (#11446)
all : don't double-throw exceptions (#11175)
all : fix some abstract inlining failures (#11526)
all : fix JsonPrinter empty parent class (#11560)
all : dce: clean up operator handling (#11427)
all : analyzer: deal with unreachable block in binops (#11402)
all : analyzer: don't recursively check enum values when const propagating (#11429)
all : analyzer: fix check for inlined purity meta
display : fix errors from parser missing in diagnostics (#8687)
display : fix display services with static extension (#11285)
display : fix display services with safe navigation (#11205)
hl : hlopt rework try-catch control flow (#11581)
hl/c : fix reserved keywords (#11408)

Deprecation / future version handling:

all : don't infer string on concat, when using -D haxe-next (#11318)
all : handle optional arguments with bind, when using -D haxe-next (#11533)
macro : build order vs inheritance, when using -D haxe-next (#11582)
macro : deprecate some API from haxe.macro.Compiler (see #11540)
java/jvm : warn about --java ... -D jvm vs --jvm ...

2023-09-17 4.3.3

General improvements:

all : improve extra field error range (#11335)
all : better error messages for --connect
hl : improve error message when hl_version is missing (#11086)
hl/c : compiler now adds hlc define when targeting hl/c (#11382)
macro : update macro API restriction warnings when using -D haxe-next (#11377)

Bugfixes:

all : handle non existing files for positions in pretty errors (#11364)
all : metadata support for local static vars
all : catch trailing invalid syntax in string interpolation (#10287)
eval : fix Array.resize retaining values (#11317)
eval/hl : fix catching haxe.ValueException (#11321)
hl : make genhl respect Meta.NoExpr (#11257)
hl : don't add bindings for non existing methods
hl/c : add missing I64 mod support
hl/c : rework reserved keywords (#11293, #11378)
hl/c : fix Int64 unsigned right shift overflow (#11382)
java/cs: fix stack overflow from closures constraints (#11350)
js : DOMElement insertAdjacentElement should not be pure (#11333)
macro : catch trailing invalid syntax in Context.parseInlineString (#11368)
macro : fix TDAbstract without flags in haxe.macro.Printer

2023-09-01 4.3.2

General improvements:

all : do not raise error on no-op reification outside macro

Bugfixes:

all : don't infer Null<?> if it already is Null<?> (#11286)
all : fix ?? inference and precedence (#11252)
all : bring back forced inline (#11217)
all : allow non constant "inline" var init with -D no-inline (#11192)
all : improve @:enum abstract deprecation warning handling (#11302)
all : fix some stack overflow with pretty errors
display : fix go to definition with final (#11173)
display : fix completion requests with @:forwardStatics (#11294)
eval : fix MainLoop.add not repeating (#11202)
hl/eval/neko : fix exception stack when wrapping native exceptions (#11249)
macro : map `this` when restoring typed expressions (#11212)
macro : safe navigation fix for ExprTools.map (#11204)
macro : safe navigation fix for haxe.macro.Printer (#11206)
macro : macro generated EVars position fixes (#11163)
macro : fix abstract casts for local statics (#11301)
macro : add flags to TDAbstract to be able to construct enum abstracts (#11230)
nullsafety : make break/continue expressions not-nullable (#11269)
nullsafety : handle return in assignment (#11114)

2023-04-28 4.3.1

Breaking changes:

all : namespace message reporting defines (#11142)

General improvements:

all : support deprecation for defines

Bugfixes:

all : fix --times with compilation server (#11091)
all : fix default type parameters not respecting imports (#11161)
all : fix bytecode bindings issues (#11098)
macro : allow local statics in macro functions (#11096)
cpp : fix AtomicInt warnings on cppia (#11105)
cpp : fix deprecated implicit casts of cpp.Int64 (#10998)
cpp : add white space around template type syntax (#11107)
java : don't check native signatures on extern functions (#11131)
lua : remove non existent luautf8 charCodeAt extern (#11097)

2023-04-06 4.3.0

New features:
Expand Down
70 changes: 36 additions & 34 deletions extra/ImportAll.hx
Expand Up @@ -72,42 +72,44 @@ class ImportAll {
if (!Context.defined("neko") && !Context.defined("cpp")) return;
case "tools", "build-tool", "jar-tool": return;
}
for( p in Context.getClassPath() ) {
if( p == "/" || p == "" )
continue;
// skip if we have a classpath to haxe
if( pack.length == 0 && sys.FileSystem.exists(p+"std") )
continue;
var p = p + pack.split(".").join("/");
if( StringTools.endsWith(p,"/") )
p = p.substr(0,-1);
if( !sys.FileSystem.exists(p) || !sys.FileSystem.isDirectory(p) )
continue;
for( file in sys.FileSystem.readDirectory(p) ) {
if( file == ".svn" || file == "_std" )
Context.onAfterInitMacros(() -> {
for( p in Context.getClassPath() ) {
if( p == "/" || p == "" )
continue;
var full = (pack == "") ? file : pack + "." + file;
if( StringTools.endsWith(file, ".hx") && file.substr(0, file.length - 3).indexOf(".") < 0 ) {
var cl = full.substr(0, full.length - 3);
switch( cl ) {
case "ImportAll", "neko.db.MacroManager": continue;
case "haxe.TimerQueue": if( Context.defined("neko") || Context.defined("php") || Context.defined("cpp") ) continue;
case "Sys": if(!isSysTarget()) continue;
case "haxe.web.Request": if( !(Context.defined("neko") || Context.defined("php") || Context.defined("js")) ) continue;
case "haxe.macro.ExampleJSGenerator","haxe.macro.Context", "haxe.macro.Compiler": if( !Context.defined("eval") ) continue;
case "haxe.remoting.SocketWrapper": if( !Context.defined("flash") ) continue;
case "haxe.remoting.SyncSocketConnection": if( !(Context.defined("neko") || Context.defined("php") || Context.defined("cpp")) ) continue;
case "neko.vm.Ui" | "sys.db.Sqlite" | "sys.db.Mysql" if ( Context.defined("interp") ): continue;
case "sys.db.Sqlite" | "sys.db.Mysql" | "cs.db.AdoNet" if ( Context.defined("cs") ): continue;
case "haxe.atomic.AtomicBool" if(!Context.defined("target.atomics")): continue;
case "haxe.atomic.AtomicInt" if(!Context.defined("target.atomics")): continue;
case "haxe.atomic.AtomicObject" if(!Context.defined("target.atomics") || Context.defined("js") || Context.defined("cpp")): continue;
}
Context.getModule(cl);
} else if( sys.FileSystem.isDirectory(p + "/" + file) )
run(full);
// skip if we have a classpath to haxe
if( pack.length == 0 && sys.FileSystem.exists(p+"std") )
continue;
var p = p + pack.split(".").join("/");
if( StringTools.endsWith(p,"/") )
p = p.substr(0,-1);
if( !sys.FileSystem.exists(p) || !sys.FileSystem.isDirectory(p) )
continue;
for( file in sys.FileSystem.readDirectory(p) ) {
if( file == ".svn" || file == "_std" )
continue;
var full = (pack == "") ? file : pack + "." + file;
if( StringTools.endsWith(file, ".hx") && file.substr(0, file.length - 3).indexOf(".") < 0 ) {
var cl = full.substr(0, full.length - 3);
switch( cl ) {
case "ImportAll", "neko.db.MacroManager": continue;
case "haxe.TimerQueue": if( Context.defined("neko") || Context.defined("php") || Context.defined("cpp") ) continue;
case "Sys": if(!isSysTarget()) continue;
case "haxe.web.Request": if( !(Context.defined("neko") || Context.defined("php") || Context.defined("js")) ) continue;
case "haxe.macro.ExampleJSGenerator","haxe.macro.Context", "haxe.macro.Compiler": if( !Context.defined("eval") ) continue;
case "haxe.remoting.SocketWrapper": if( !Context.defined("flash") ) continue;
case "haxe.remoting.SyncSocketConnection": if( !(Context.defined("neko") || Context.defined("php") || Context.defined("cpp")) ) continue;
case "neko.vm.Ui" | "sys.db.Sqlite" | "sys.db.Mysql" if ( Context.defined("interp") ): continue;
case "sys.db.Sqlite" | "sys.db.Mysql" | "cs.db.AdoNet" if ( Context.defined("cs") ): continue;
case "haxe.atomic.AtomicBool" if(!Context.defined("target.atomics")): continue;
case "haxe.atomic.AtomicInt" if(!Context.defined("target.atomics")): continue;
case "haxe.atomic.AtomicObject" if(!Context.defined("target.atomics") || Context.defined("js") || Context.defined("cpp")): continue;
}
Context.getModule(cl);
} else if( sys.FileSystem.isDirectory(p + "/" + file) )
run(full);
}
}
}
});
}

}
9 changes: 4 additions & 5 deletions extra/github-actions/build-mac.yml
@@ -1,8 +1,8 @@
- name: Install dependencies
env:
# For compatibility with macOS 10.13
ZLIB_VERSION: 1.2.13
MBEDTLS_VERSION: 2.25.0
ZLIB_VERSION: 1.3
MBEDTLS_VERSION: 2.28.5
PCRE2_VERSION: 10.42
run: |
set -ex
Expand Down Expand Up @@ -32,14 +32,13 @@
make && make install
cd ..


- name: Install OCaml libraries
if: steps.cache-opam.outputs.cache-hit != 'true'
run: |
set -ex
opam init # --disable-sandboxing
opam update
opam switch create 4.07.1
opam switch create 4.08.1
eval $(opam env)
opam env
opam pin add ctypes 0.17.1 --yes
Expand All @@ -64,7 +63,7 @@
otool -L ./haxelib

- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
with:
name: macBinaries
path: out
9 changes: 8 additions & 1 deletion extra/github-actions/build-windows.yml
Expand Up @@ -26,8 +26,15 @@
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxelib.exe')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && ls ./out')

- name: Check artifact
shell: bash
run: |
ls out
# Output should contain binaries zip, installer zip and nupkg
[ $(ls -1 out | wc -l) -eq "3" ]

- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
with:
name: win${{env.ARCH}}Binaries
path: out
6 changes: 0 additions & 6 deletions extra/github-actions/cache-opam.yml

This file was deleted.

4 changes: 3 additions & 1 deletion extra/github-actions/install-nsis.yml
@@ -1,12 +1,14 @@
- name: choco install nsis
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 10
command: choco install --no-progress nsis.portable --version 3.02 -y

- name: choco install things
shell: pwsh
run: choco install --no-progress curl wget 7zip.portable -y

- name: Prepend Chocolatey path
shell: pwsh
run: Write-Host "::add-path::C:\ProgramData\chocolatey\bin"
9 changes: 2 additions & 7 deletions extra/github-actions/install-ocaml-libs-windows.yml
@@ -1,11 +1,6 @@
- name: Install OCaml libraries
if: steps.cache-opam.outputs.cache-hit != 'true'
shell: pwsh
run: |
Set-PSDebug -Trace 1
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam init mingw "https://github.com/fdopen/opam-repository-mingw.git#opam2" --comp 4.07.0+mingw${ARCH}c --switch 4.07.0+mingw${ARCH}c --auto-setup --yes 2>&1')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v')
opam install haxe --deps-only
opam list
38 changes: 30 additions & 8 deletions extra/github-actions/install-ocaml-windows.yml
@@ -1,17 +1,39 @@
- name: Install OCaml
- name: Setup ocaml
id: ocaml
continue-on-error: true
uses: kLabz/setup-ocaml@win32
with:
ocaml-compiler: 4.08.1
opam-depext: false
opam-repositories: |
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
default: https://github.com/ocaml/opam-repository.git
opam-local-packages: |
haxe.opam
cache-prefix: w32-v1

# TODO make it work on first try
# (when cygwin cache doesn't exist, ocaml install fails with a curl error)
- name: Setup ocaml (second chance)
if: steps.ocaml.outcome == 'failure'
uses: kLabz/setup-ocaml@win32
with:
ocaml-compiler: 4.08.1
opam-depext: false
opam-repositories: |
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
default: https://github.com/ocaml/opam-repository.git
opam-local-packages: |
haxe.opam
cache-prefix: w32-v1

- name: Install dependencies
shell: pwsh
run: |
Set-PSDebug -Trace 1
curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP)
Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre2-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre2 --allow-unsupported-windows" -Wait -RedirectStandardOutput cygwin-setup-out.txt
Get-Content cygwin-setup-out.txt
& "$($env:CYG_ROOT)/bin/bash.exe" @('--norc', '--noprofile', '/etc/postinstall/ca-certificates.sh')
curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz
curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 https://github.com/Simn/mingw64-mbedtls/releases/download/2.16.3/mingw64-$($env:MINGW_ARCH)-mbedtls-2.16.3-1.tar.xz
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'curl -L https://cpanmin.us | perl - App::cpanminus')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm IPC::System::Simple module')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm String::ShellQuote')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh')
18 changes: 11 additions & 7 deletions extra/github-actions/install-ocaml-windows64.yml
@@ -1,16 +1,20 @@
- name: Install OCaml
- name: Setup ocaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.08.1
opam-repositories: |
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
default: https://github.com/ocaml/opam-repository.git
opam-local-packages: |
haxe.opam

- name: Install dependencies
shell: pwsh
run: |
Set-PSDebug -Trace 1
curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP)
Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre2-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre2" -Wait -RedirectStandardOutput cygwin-setup-out.txt
Get-Content cygwin-setup-out.txt
curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz
curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 https://github.com/Simn/mingw64-mbedtls/releases/download/2.16.3/mingw64-$($env:MINGW_ARCH)-mbedtls-2.16.3-1.tar.xz
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'curl -L https://cpanmin.us | perl - App::cpanminus')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm IPC::System::Simple module')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm String::ShellQuote')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz')
& "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh')