Skip to content

Commit

Permalink
Merge branch 'development' into cpp_typed_funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 committed Aug 30, 2024
2 parents 20e0ff0 + 7415e9f commit 861ea26
Show file tree
Hide file tree
Showing 969 changed files with 18,035 additions and 51,434 deletions.
367 changes: 90 additions & 277 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions .github/workflows/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check pull request target branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.base_ref }} != "development" ]; then
echo "Merge requests should target `development`."
exit 1
fi
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
3 changes: 1 addition & 2 deletions .vscode/schemas/meta.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"flash",
"php",
"cpp",
"cs",
"java",
"jvm",
"python",
"hl",
"eval"
Expand Down
14 changes: 1 addition & 13 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 Expand Up @@ -221,7 +222,6 @@ xmldoc:
RUN haxelib newrepo
RUN haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp
RUN haxelib git hxjava https://github.com/HaxeFoundation/hxjava
RUN haxelib git hxcs https://github.com/HaxeFoundation/hxcs
RUN haxe doc.hxml

ARG COMMIT
Expand Down Expand Up @@ -271,11 +271,6 @@ test-environment-php:
DO +INSTALL_PACKAGES --PACKAGES="php-cli php-mbstring php-sqlite3"
SAVE IMAGE --cache-hint

test-environment-cs:
FROM +test-environment
DO +INSTALL_PACKAGES --PACKAGES="mono-devel mono-mcs"
SAVE IMAGE --cache-hint

test-environment-hl:
FROM +test-environment
DO +INSTALL_PACKAGES --PACKAGES="cmake ninja-build libturbojpeg-dev libpng-dev zlib1g-dev libvorbis-dev libsqlite3-dev"
Expand Down Expand Up @@ -361,12 +356,6 @@ test-jvm:
ENV GITHUB_ACTIONS=$GITHUB_ACTIONS
DO +RUN_CI --TEST=jvm

test-cs:
FROM +test-environment-cs
ARG GITHUB_ACTIONS
ENV GITHUB_ACTIONS=$GITHUB_ACTIONS
DO +RUN_CI --TEST=cs

test-php:
FROM +test-environment-php
ARG GITHUB_ACTIONS
Expand Down Expand Up @@ -400,7 +389,6 @@ test-all:
BUILD +test-python
BUILD +test-java
BUILD +test-jvm
BUILD +test-cs
BUILD +test-cpp
BUILD +test-lua
BUILD +test-js
Expand Down
41 changes: 32 additions & 9 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 @@ -162,25 +176,34 @@ xmldoc:
$(CURDIR)/$(HAXELIB_OUTPUT) newrepo && \
$(CURDIR)/$(HAXELIB_OUTPUT) git hxcpp https://github.com/HaxeFoundation/hxcpp && \
$(CURDIR)/$(HAXELIB_OUTPUT) git hxjava https://github.com/HaxeFoundation/hxjava && \
$(CURDIR)/$(HAXELIB_OUTPUT) git hxcs https://github.com/HaxeFoundation/hxcs && \
PATH="$(CURDIR):$(PATH)" $(CURDIR)/$(HAXE_OUTPUT) doc.hxml

$(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
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Haxe allows you to compile for the following targets:

* JavaScript
* C++
* C#
* Java
* JVM
* Lua
* PHP 7
Expand Down Expand Up @@ -82,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
2 changes: 1 addition & 1 deletion extra/BUILDING.md
Original file line number Diff line number Diff line change
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 mbedtls@2`.
* Use [Homebrew](https://brew.sh/), `brew install zlib pcre2 mbedtls`.
* Debian / Ubuntu
* `sudo apt install libpcre2-dev zlib1g-dev libmbedtls-dev`.
* Windows (Cygwin)
Expand Down
72 changes: 72 additions & 0 deletions extra/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
2024-08-07 4.3.6

Bugfixes:

display : do not define "display" for json rpc diagnostics (#11746)
cpp : null check interfaces (#11743)
hl : ignore WANT_READ/WANT_WRITE errors when the socket is known to be blocking (#11655)
hl : fix weird compiler error (#11690)
jvm : fix --java out -D jvm deprecation warning (#11739)
macro : Context.reportError should not abort build macros (#11741)

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:

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:
Expand Down
9 changes: 2 additions & 7 deletions extra/ImportAll.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ImportAll {

static function isSysTarget() {
return Context.defined("neko") || Context.defined("php") || Context.defined("cpp") ||
Context.defined("java") || Context.defined("python") ||
Context.defined("jvm") || Context.defined("python") ||
Context.defined("lua") || Context.defined("hl") || Context.defined("eval");
}

Expand All @@ -51,12 +51,8 @@ class ImportAll {
if(!isSysTarget()) return;
case "sys.thread":
if ( !Context.defined("target.threaded") ) return;
case "java":
if( !Context.defined("java") ) return;
case "jvm":
case "java" | "jvm":
if( !Context.defined("jvm") ) return;
case "cs":
if( !Context.defined("cs") ) return;
case "python":
if ( !Context.defined("python") ) return;
case "hl":
Expand Down Expand Up @@ -96,7 +92,6 @@ class ImportAll {
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;
Expand Down
9 changes: 0 additions & 9 deletions extra/all.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,10 @@
-xml cpp.xml
-D HXCPP_MULTI_THREADED

--next
-java all_java
-xml java.xml

--next
--jvm all_jvm
-xml jvm.xml

--next
-cs all_cs
-D unsafe
-xml cs.xml

--next
-python all_python
-xml python.xml
Expand Down
9 changes: 2 additions & 7 deletions extra/doc.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,8 @@
-D HXCPP_MULTI_THREADED

--next
-java all_java
-xml doc/java.xml

--next
-cs all_cs
-D unsafe
-xml doc/cs.xml
--jvm all_jvm
-xml doc/jvm.xml

--next
-python all_py
Expand Down
Loading

0 comments on commit 861ea26

Please sign in to comment.