Skip to content

Commit

Permalink
Merge branch 'development' into dev-tests-nullops
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Jul 25, 2024
2 parents 3afc5ea + a97dc16 commit 4d2bc72
Show file tree
Hide file tree
Showing 241 changed files with 2,689 additions and 725 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ jobs:
tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP
NEKOPATH=`echo $RUNNER_TEMP/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/include
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/include/* /usr/local/include/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
Expand Down Expand Up @@ -264,9 +266,11 @@ jobs:
tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP
NEKOPATH=`echo $RUNNER_TEMP/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/include
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/include/* /usr/local/include/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
Expand Down Expand Up @@ -340,9 +344,11 @@ jobs:
tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP
NEKOPATH=`echo $RUNNER_TEMP/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/include
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/include/* /usr/local/include/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
Expand Down Expand Up @@ -448,10 +454,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, macos-14]
os: [macos-14, macos-13]
runs-on: ${{ matrix.os }}
env:
PLATFORM: mac
PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}
OPAMYES: 1
MACOSX_DEPLOYMENT_TARGET: 10.13
OCAML_VERSION: 5.1.1
Expand All @@ -476,9 +482,11 @@ jobs:
tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP
NEKOPATH=`echo $RUNNER_TEMP/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/include
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/include/* /usr/local/include/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
Expand Down Expand Up @@ -543,14 +551,14 @@ jobs:
otool -L ./haxelib
- name: Upload artifact (x64)
if: matrix.os == 'macos-latest'
if: runner.arch == 'X64'
uses: actions/upload-artifact@v4
with:
name: macX64Binaries
path: out

- name: Upload artifact (arm)
if: matrix.os == 'macos-14'
if: runner.arch == 'ARM64'
uses: actions/upload-artifact@v4
with:
name: macArmBinaries
Expand Down Expand Up @@ -674,9 +682,8 @@ jobs:
tar -xf macX64Binaries/*_bin.tar.gz -C macX64Binaries --strip-components=1
tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
lipo -create -output haxe macX64Binaries/haxe macArmBinaries/haxe
# there is only x64 haxelib
mv macX64Binaries/haxelib .
make -s package_unix package_installer_mac
lipo -create -output haxelib macX64Binaries/haxelib macArmBinaries/haxelib
make -s package_unix package_installer_mac PACKAGE_INSTALLER_MAC_ARCH=universal
ls -l out
otool -L ./haxe
otool -L ./haxelib
Expand All @@ -689,7 +696,7 @@ jobs:

mac-test:
needs: mac-build-universal
runs-on: macos-latest
runs-on: macos-13
env:
PLATFORM: mac
TEST: ${{matrix.target}}
Expand Down Expand Up @@ -719,9 +726,11 @@ jobs:
tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP
NEKOPATH=`echo $RUNNER_TEMP/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/include
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/include/* /usr/local/include/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
Expand Down
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
/std/tools/haxelib/haxelib.n
/std/tools/haxelib/index.n

/tests/**/dump
/tests/unit/as3
/tests/unit/cpp
/tests/unit/java
Expand All @@ -54,7 +55,6 @@
/tests/unit/php
/tests/unit/cs
/tests/unit/cs_unsafe
/tests/unit/dump
/tests/unit/db.db3

/tests/unit/native_java/obj
Expand All @@ -69,7 +69,6 @@
/tests/unit/node_modules/

/tests/nullsafety/bin
/tests/nullsafety/dump

/haxe.sublime*
.idea
Expand All @@ -85,9 +84,7 @@ tests/unit/unit.py
tests/unit/unit.py.res1.txt
tests/unit/unit.py.res2.bin
tests/sys/bin/
/tests/sys/dump/
/tests/sys/test-res/
tests/optimization/dump/
tests/misc/projects/*/*.n
tests/misc/*/*/*.lua
tests/unit/bin/
Expand All @@ -100,7 +97,6 @@ tests/misc/projects/Issue4070/cpp/
/tests/misc/eventLoop/eventLoop.js
/tests/misc/eventLoop/eventLoop.n
/tests/misc/eventLoop/eventLoop.swf
/tests/misc/eventLoop/dump
/tests/misc/eventLoop/eventLoop.py
/tests/misc/eventLoop/php
*.vscode/
Expand All @@ -127,7 +123,6 @@ dev-display.hxml
tests/sourcemaps/bin
/*_plugin.ml
tests/benchs/export/
tests/benchs/dump/
tests/display/.unittest/
tests/unit/.unittest/
tests/threads/export/
Expand Down
1 change: 1 addition & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ INSTALL_NEKO:
ARG PREFIX=/usr/local
RUN bash -c "ln -s \"$NEKOPATH\"/{neko,nekoc,nekoml,nekotools} \"$PREFIX/bin/\""
RUN bash -c "ln -s \"$NEKOPATH\"/libneko.* \"$PREFIX/lib/\""
RUN bash -c "ln -s \"$NEKOPATH\"/*.h \"$PREFIX/include/\""
RUN mkdir -p "$PREFIX/lib/neko/"
RUN bash -c "ln -s \"$NEKOPATH\"/*.ndll \"$PREFIX/lib/neko/\""
RUN ldconfig
Expand Down
40 changes: 32 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PACKAGE_FILE_NAME=haxe_$(COMMIT_DATE)_$(COMMIT_SHA)
HAXE_VERSION=$(shell $(CURDIR)/$(HAXE_OUTPUT) -version 2>&1 | awk '{print $$1;}')
HAXE_VERSION_SHORT=$(shell echo "$(HAXE_VERSION)" | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+")

NEKO_VERSION=2.3.0
NEKO_VERSION=2.4.0-rc.1
NEKO_MAJOR_VERSION=$(shell echo "$(NEKO_VERSION)" | grep -oE "^[0-9]+")
NEKO_VERSION_TAG=v$(shell echo "$(NEKO_VERSION)" | sed "s/\./-/g")

Expand Down Expand Up @@ -104,10 +104,24 @@ copy_haxetoolkit: /cygdrive/c/HaxeToolkit/haxe/haxe.exe
cp $< $@
endif

ifeq ($(SYSTEM_NAME),Mac)
# This assumes that haxelib and neko will both be installed into INSTALL_DIR,
# which is the case when installing using the mac installer package
HAXELIB_LFLAGS= -Wl,-rpath,$(INSTALL_DIR)/lib
endif

haxelib_unix:
cd $(CURDIR)/extra/haxelib_src && \
HAXE_STD_PATH=$(CURDIR)/std $(CURDIR)/$(HAXE_OUTPUT) client.hxml && \
nekotools boot -c run.n
$(CC) $(CURDIR)/extra/haxelib_src/run.c -o $(HAXELIB_OUTPUT) -lneko $(HAXELIB_LFLAGS)

# haxelib should depends on haxe, but we don't want to do that...
haxelib:
(cd $(CURDIR)/extra/haxelib_src && $(CURDIR)/$(HAXE_OUTPUT) client.hxml && nekotools boot run.n)
mv extra/haxelib_src/run$(EXTENSION) $(HAXELIB_OUTPUT)
ifeq ($(SYSTEM_NAME),Windows)
haxelib: haxelib_$(PLATFORM)
else
haxelib: haxelib_unix
endif

tools: haxelib

Expand Down Expand Up @@ -167,19 +181,29 @@ xmldoc:
$(INSTALLER_TMP_DIR):
mkdir -p $(INSTALLER_TMP_DIR)

$(INSTALLER_TMP_DIR)/neko-osx64.tar.gz: $(INSTALLER_TMP_DIR)
wget -nv https://github.com/HaxeFoundation/neko/releases/download/$(NEKO_VERSION_TAG)/neko-$(NEKO_VERSION)-osx64.tar.gz -O installer/neko-osx64.tar.gz
# Can be 'universal', 'arm64', or 'x86_64'
ifndef PACKAGE_INSTALLER_MAC_ARCH
PACKAGE_INSTALLER_MAC_ARCH:=$(shell uname -m)
endif

$(INSTALLER_TMP_DIR)/neko-osx.tar.gz: $(INSTALLER_TMP_DIR)
NEKO_ARCH_SUFFIX=$$(if [ "$(PACKAGE_INSTALLER_MAC_ARCH)" = "x86_64" ]; then \
echo 64; \
else \
echo "-$(PACKAGE_INSTALLER_MAC_ARCH)"; \
fi); \
wget -nv https://github.com/HaxeFoundation/neko/releases/download/$(NEKO_VERSION_TAG)/neko-$(NEKO_VERSION)-osx$$NEKO_ARCH_SUFFIX.tar.gz -O installer/neko-osx.tar.gz

# Installer

package_installer_mac: $(INSTALLER_TMP_DIR)/neko-osx64.tar.gz package_unix
package_installer_mac: $(INSTALLER_TMP_DIR)/neko-osx.tar.gz package_unix
$(eval OUTFILE := $(shell pwd)/$(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_installer.tar.gz)
$(eval PACKFILE := $(shell pwd)/$(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_bin.tar.gz)
$(eval VERSION := $(shell $(CURDIR)/$(HAXE_OUTPUT) -version 2>&1))
bash -c "rm -rf $(INSTALLER_TMP_DIR)/{resources,pkg,tgz,haxe.tar.gz}"
mkdir $(INSTALLER_TMP_DIR)/resources
# neko - unpack to change the dir name
cd $(INSTALLER_TMP_DIR)/resources && tar -zxvf ../neko-osx64.tar.gz
cd $(INSTALLER_TMP_DIR)/resources && tar -zxvf ../neko-osx.tar.gz
mv $(INSTALLER_TMP_DIR)/resources/neko* $(INSTALLER_TMP_DIR)/resources/neko
cd $(INSTALLER_TMP_DIR)/resources && tar -zcvf neko.tar.gz neko
# haxe - unpack to change the dir name
Expand Down
7 changes: 7 additions & 0 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ PACKAGE_FILES=$(HAXE_OUTPUT) $(HAXELIB_OUTPUT) std \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libmbedtls.dll | sed -e 's/^\s*//')" \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libmbedx509.dll | sed -e 's/^\s*//')"

# haxelib should depends on haxe, but we don't want to do that...
haxelib_win:
cd $(CURDIR)/extra/haxelib_src && \
HAXE_STD_PATH=$$(cygpath -m $(CURDIR)/std) $(CURDIR)/$(HAXE_OUTPUT) client.hxml && \
nekotools boot run.n
mv extra/haxelib_src/run$(EXTENSION) $(HAXELIB_OUTPUT)

echo_package_files:
echo $(PACKAGE_FILES)

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ You can get help and talk with fellow Haxers from around the world via:
* [Haxe on Stack Overflow](https://stackoverflow.com/questions/tagged/haxe)
* [Haxe Gitter chatroom](https://gitter.im/HaxeFoundation/haxe/)
* [Haxe Discord server](https://discordapp.com/invite/0uEuWH3spjck73Lo)
* [#haxe on Twitter](https://twitter.com/hashtag/haxe?src=hash)

:+1: Get notified of the latest Haxe news, follow us on [Twitter](https://twitter.com/haxelang), [Facebook](https://www.facebook.com/haxe.org) and don't forget to read the [Haxe roundups](https://haxe.io/).
:+1: Get notified of the latest Haxe news, don't forget to read the [Haxe roundups](https://haxe.io/).

## Version compatibility

Expand Down
30 changes: 30 additions & 0 deletions extra/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
2024-07-18 4.3.5

General improvements:

all : macOS universal binaries (#11572)
display : migrated diagnostics to Json RPC (#11707)
macro : expose TVar VStatic flag in macros. (#11683)

Bugfixes:

all : fix `@:structInit` with getter + setter (#11662)
all : add missing recursion when checking abstract casts (#11676)
all : fail nicer if unify_min can't find a common type (#11684)
all : fix pretty errors failure (#11700)
all : disallow local statics when inlining (#11725)
display : unused pattern variables should be marked as unused (#7282)
display : diagnostics miss "used without being initialized" errors (#7931)
display : recursive inline is not supported on enum abstract constructor (#11177)
display : Void as value error disappears on second compilation (#11184)
display : false positives of "This cast has no effect, but some of its sub-expressions" (#11203)
cpp : inherit `@:unreflective` on generic classes
hl : fix bit shift + assignment in while loop header (#10783)
hl : fix do-while loop in genhl+hlopt (#11461)
hl/c : use uint64 instead of uint64_t for shift cast (#11721)
macro : don't choke on namePos for reification pattern matching (#11671)

Deprecation / future version handling:

macro : `Compiler.include()` warning when used outside init macros

2024-03-04 4.3.4

General improvements:
Expand Down
4 changes: 2 additions & 2 deletions extra/github-actions/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
otool -L ./haxelib
- name: Upload artifact (x64)
if: matrix.os == 'macos-latest'
if: runner.arch == 'X64'
uses: actions/upload-artifact@v4
with:
name: macX64Binaries
path: out

- name: Upload artifact (arm)
if: matrix.os == 'macos-14'
if: runner.arch == 'ARM64'
uses: actions/upload-artifact@v4
with:
name: macArmBinaries
Expand Down
2 changes: 2 additions & 0 deletions extra/github-actions/install-neko-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP
NEKOPATH=`echo $RUNNER_TEMP/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/include
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/include/* /usr/local/include/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
Expand Down
11 changes: 5 additions & 6 deletions extra/github-actions/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, macos-14]
os: [macos-14, macos-13]
runs-on: ${{ matrix.os }}
env:
PLATFORM: mac
PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}
OPAMYES: 1
MACOSX_DEPLOYMENT_TARGET: 10.13
OCAML_VERSION: 5.1.1
Expand Down Expand Up @@ -378,9 +378,8 @@ jobs:
tar -xf macX64Binaries/*_bin.tar.gz -C macX64Binaries --strip-components=1
tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
lipo -create -output haxe macX64Binaries/haxe macArmBinaries/haxe
# there is only x64 haxelib
mv macX64Binaries/haxelib .
make -s package_unix package_installer_mac
lipo -create -output haxelib macX64Binaries/haxelib macArmBinaries/haxelib
make -s package_unix package_installer_mac PACKAGE_INSTALLER_MAC_ARCH=universal
ls -l out
otool -L ./haxe
otool -L ./haxelib
Expand All @@ -393,7 +392,7 @@ jobs:

mac-test:
needs: mac-build-universal
runs-on: macos-latest
runs-on: macos-13
env:
PLATFORM: mac
TEST: ${{matrix.target}}
Expand Down
2 changes: 1 addition & 1 deletion haxe.opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ depends: [
("ocaml" {>= "5.0"} & ("camlp5" {build}))
| ("ocaml" {>= "4.08" & < "5.0"} & ("camlp5" {build & = "8.00.03"}))
"ocamlfind" {build}
"dune" {>= "1.11"}
"dune" {>= "1.11" & < "3.16"}
"sedlex" {>= "2.0"}
"xml-light"
"extlib" {>= "1.7.8"}
Expand Down
4 changes: 2 additions & 2 deletions libs/mbedtls/mbedtls.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ external mbedtls_ssl_setup : mbedtls_ssl_context -> mbedtls_ssl_config -> mbedtl
external mbedtls_ssl_write : mbedtls_ssl_context -> bytes -> int -> int -> mbedtls_result = "ml_mbedtls_ssl_write"

external mbedtls_pk_init : unit -> mbedtls_pk_context = "ml_mbedtls_pk_init"
external mbedtls_pk_parse_key : mbedtls_pk_context -> bytes -> string option -> mbedtls_result = "ml_mbedtls_pk_parse_key"
external mbedtls_pk_parse_keyfile : mbedtls_pk_context -> string -> string option -> mbedtls_result = "ml_mbedtls_pk_parse_keyfile"
external mbedtls_pk_parse_key : mbedtls_pk_context -> bytes -> string option -> mbedtls_ctr_drbg_context -> mbedtls_result = "ml_mbedtls_pk_parse_key"
external mbedtls_pk_parse_keyfile : mbedtls_pk_context -> string -> string option -> mbedtls_ctr_drbg_context -> mbedtls_result = "ml_mbedtls_pk_parse_keyfile"
external mbedtls_pk_parse_public_keyfile : mbedtls_pk_context -> string -> mbedtls_result = "ml_mbedtls_pk_parse_public_keyfile"
external mbedtls_pk_parse_public_key : mbedtls_pk_context -> bytes -> mbedtls_result = "ml_mbedtls_pk_parse_public_key"

Expand Down
Loading

0 comments on commit 4d2bc72

Please sign in to comment.