Skip to content

Commit

Permalink
Merge pull request HaxeFoundation#4206 from HaxeFoundation/development
Browse files Browse the repository at this point in the history
3.2.0
  • Loading branch information
Simn committed May 12, 2015
2 parents 27fa742 + b39a37a commit 77d171b
Show file tree
Hide file tree
Showing 228 changed files with 3,353 additions and 847 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.a
*.exe
.*.swp
/out

/extra/hxclasses
/extra/*.swf
Expand Down Expand Up @@ -70,3 +71,4 @@ tests/misc/projects/*/*.n
tests/unit/bin/
tests/*.n
tests/misc/projects/Issue3756/cpp/
tests/misc/projects/Issue4070/cpp/
47 changes: 38 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ os:

env:
global:
# make variables
- OCAMLC=ocamlc.opt
- OCAMLOPT=ocamlopt.opt
- ADD_REVISION=1
# SAUCE_USERNAME
- secure: SjyKefmjUEXi0IKHGGpcbLAajU0mLHONg8aA8LoY7Q9nAkSN6Aql+fzS38Boq7w1jWn+2FOpr+4jy0l6wVd/bftsF+huFfYpFJmdh8BlKmE0K71zZAral0H1c7YxkuQpPiJCIFGXqtkvev7SWTy0z31u7kuuQeEyW27boXe5cDA=
# SAUCE_ACCESS_KEY
Expand All @@ -27,26 +31,51 @@ matrix:
# fast_finish: true #https://github.com/travis-ci/travis-ci/issues/1696

before_script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then mysql -u root -e "CREATE DATABASE haxe_test;"; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
mysql -u root -e "CREATE DATABASE haxe_test;";
fi

install:
- if [ -z "${TRAVIS_OS_NAME}" ]; then export TRAVIS_OS_NAME=linux; fi; # for our forks that do not have mult-os enabled.
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then travis_retry sudo apt-get update -qq; travis_retry sudo apt-get install ocaml-native-compilers zlib1g-dev libgc-dev -qq; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then travis_retry brew update; travis_retry brew install caskroom/cask/brew-cask; travis_retry brew install ocaml camlp4; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then travis_retry git clone https://github.com/HaxeFoundation/neko.git ~/neko && cd ~/neko && make os=${TRAVIS_OS_NAME} -s && sudo make install -s && cd $TRAVIS_BUILD_DIR; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then travis_retry brew install neko --HEAD; fi
# For our forks that do not have mult-os enabled...
- if [ -z "${TRAVIS_OS_NAME}" ]; then
export TRAVIS_OS_NAME=linux;
fi
# Install haxe and neko dependencies
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
travis_retry sudo apt-get update -qq;
travis_retry sudo apt-get install ocaml-native-compilers zlib1g-dev libgc-dev -qq;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
travis_retry brew update;
travis_retry brew install caskroom/cask/brew-cask;
travis_retry brew install ocaml camlp4;
fi
# Install neko
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
travis_retry git clone https://github.com/HaxeFoundation/neko.git ~/neko;
cd ~/neko && make os=${TRAVIS_OS_NAME} -s && sudo make install -s;
cd $TRAVIS_BUILD_DIR;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
travis_retry brew install neko --HEAD;
fi

script:
- make OCAMLOPT=ocamlopt.opt -s
- make -s
- make tools -s
- sudo make install -s
- cd tests/
- mkdir ~/haxelib && haxelib setup ~/haxelib
- haxelib git hx-yaml https://github.com/mikestead/hx-yaml master src
- haxe -version
- haxe -neko RunCi.n -main RunCi -lib hx-yaml
- haxe RunCi.hxml
- neko RunCi.n

branches:
except:
# A hack to prevent building for tags, assuming they all start with a number.
# https://github.com/travis-ci/travis-ci/issues/1532
- /^[0-9]/

notifications:
webhooks:
urls:
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Things to check before/while filing an issue:

- Check if you actually suspect that there's an issue in the Haxe code. If you find yourself writing "How do I..." you may want to consider a different communication channel. Refer to http://haxe.org/community/community-support.html for more information.
- Reduce your code to a minimal example (see http://sscce.org/). In particular avoid library dependencies: If you cannot reproduce your issue without using a specific library, it might not be a Haxe issue to begin with.
- Check if your problems are already resolved in the Haxe development version (for builds see http://builds.haxe.org/).
- Most targets produce readable code. If you suspect the generated code to be wrong, try checking the output. Note that you can add `-D dump=pretty` to your compilation parameters and find the code which is passed to the generators in a `dump` sub directory.
Expand Down
31 changes: 21 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ INSTALL_LIB_DIR=$(INSTALL_DIR)/lib/haxe

OUTPUT=haxe
EXTENSION=
OCAMLOPT=ocamlopt
OCAMLC=ocamlc
OCAMLOPT?=ocamlopt
OCAMLC?=ocamlc
LFLAGS=

CFLAGS= -g -I libs/extlib -I libs/extc -I libs/neko -I libs/javalib -I libs/ziplib -I libs/swflib -I libs/xml-light -I libs/ttflib -I libs/ilib -I libs/objsize
Expand Down Expand Up @@ -51,7 +51,12 @@ MODULES=ast type lexer common genxml parser typecore optimizer typeload \
codegen gencommon genas3 gencpp genjs genneko genphp \
genswf9 genswf genjava gencs genpy interp dce analyzer filters typer matcher version main

ADD_REVISION=0
ADD_REVISION?=0

BRANCH=$(shell echo $$APPVEYOR_REPO_NAME | grep -q /haxe && echo $$APPVEYOR_REPO_BRANCH || echo $$TRAVIS_REPO_SLUG | grep -q /haxe && echo $$TRAVIS_BRANCH || git rev-parse --abbrev-ref HEAD)
COMMIT_SHA=$(shell git rev-parse --short HEAD)
COMMIT_DATE=$(shell git show -s --format=%ci HEAD | grep -oh ....-..-..)
PACKAGE_FILE_NAME=haxe_$(COMMIT_DATE)_$(BRANCH)_$(COMMIT_SHA)

# using $(CURDIR) on Windows will not work since it might be a Cygwin path
ifdef SYSTEMROOT
Expand All @@ -60,12 +65,6 @@ else
export HAXE_STD_PATH=$(CURDIR)/std
endif

ifneq ($(ADD_REVISION),0)
VERSION_EXTRA="let version_extra = Some \" (git build $(shell git rev-parse --abbrev-ref HEAD) @ $(shell git describe --always)) \""
else
VERSION_EXTRA="let version_extra = None"
endif

all: libs haxe

libs:
Expand Down Expand Up @@ -176,9 +175,21 @@ lexer.$(MODULE_EXT): ast.$(MODULE_EXT)
ast.$(MODULE_EXT):

version.$(MODULE_EXT):
echo $(VERSION_EXTRA) > version.ml
$(MAKE) -f Makefile.version_extra -s ADD_REVISION=$(ADD_REVISION) BRANCH=$(BRANCH) COMMIT_SHA=$(COMMIT_SHA) COMMIT_DATE=$(COMMIT_DATE) > version.ml
$(COMPILER) $(CFLAGS) -c version.ml

# Package

package_bin:
mkdir -p out
rm -rf $(PACKAGE_FILE_NAME) $(PACKAGE_FILE_NAME).tar.gz
# Copy the package contents to $(PACKAGE_FILE_NAME)
mkdir -p $(PACKAGE_FILE_NAME)
cp -r $(OUTPUT) haxelib$(EXTENSION) std extra/LICENSE.txt extra/CONTRIB.txt extra/CHANGES.txt $(PACKAGE_FILE_NAME)
# archive
tar -zcf out/$(PACKAGE_FILE_NAME).tar.gz $(PACKAGE_FILE_NAME)
rm -r $(PACKAGE_FILE_NAME)

# Clean

clean: clean_libs clean_haxe clean_tools
Expand Down
11 changes: 11 additions & 0 deletions Makefile.version_extra
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# A hack to print the content of version.ml consistently across Windows (cygwin / command prompt) and Unix.
# The hack: http://stackoverflow.com/a/7284135/267998
# The issue: https://github.com/HaxeFoundation/haxe/commit/4f8f6a99ddf810ea045492cdd6d40c55abc03e15#commitcomment-10660400

all: ;

ifneq ($(ADD_REVISION),0)
$(info let version_extra = Some "(git build $(BRANCH) @ $(COMMIT_SHA))")
else
$(info let version_extra = None)
endif
22 changes: 16 additions & 6 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ EXTENSION=.exe

OCAMLOPT=ocamlopt.opt

ifneq ($(ADD_REVISION),0)
VERSION_EXTRA=let version_extra = Some " (git build $(shell git rev-parse --abbrev-ref HEAD) @ $(shell git describe --always)) "
else
VERSION_EXTRA=let version_extra = None
endif

kill:
-@taskkill /F /IM haxe.exe

# allow Ocaml/Mingw as well
NATIVE_LIBS += -I "c:/program files/mingw/lib/"

# use make WODI=wodi32 -f Makefile.win to build using WODI 32bit
ifdef WODI
NATIVE_LIBS += -I "/opt/${WODI}/lib"
endif
Expand All @@ -39,3 +34,18 @@ ifdef FILTER
CC_CMD=($(OCAMLOPT) $(CFLAGS) -c $< 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)
CC_PARSER_CMD=($(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)
endif

package_bin:
mkdir -p out
rm -rf $(PACKAGE_FILE_NAME) $(PACKAGE_FILE_NAME).zip temp.zip
# Copy the package contents to $(PACKAGE_FILE_NAME)
# Using poor man's cp (zip then unzip), because cp in cygwin is quite broken
mkdir -p $(PACKAGE_FILE_NAME)
7za a -y -tzip -mx0 temp.zip $(OUTPUT) haxelib$(EXTENSION) std > log.txt || type log.txt
cd extra && 7za a -y -tzip -mx0 ../temp.zip LICENSE.txt CONTRIB.txt CHANGES.txt > log.txt || type log.txt
7za x -y temp.zip -o$(PACKAGE_FILE_NAME) > log.txt || type log.txt
rm temp.zip
# archive
7za a -r -tzip out/$(PACKAGE_FILE_NAME).zip $(PACKAGE_FILE_NAME) > log.txt || type log.txt
rm -r $(PACKAGE_FILE_NAME)
rm log.txt extra/log.txt
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ For the complete Haxe licenses, please see http://haxe.org/foundation/open-sourc

## Installing Haxe

The latest stable release is [Haxe 3.2.0-rc1](http://haxe.org/download). Pre-built binaries are available for your platform:

* **[Windows installer](http://haxe.org/download/file/3.2.0-rc.1/haxe-3.2.0-rc1-win.exe)**
* **[Windows binaries](http://haxe.org/download/file/3.2.0-rc.1/haxe-3.2.0-rc1-win.zip)**
* **[OSX installer](http://haxe.org/download/file/3.2.0-rc.1/haxe-3.2.0-rc1-osx-installer.pkg)**
* **[OSX binaries](http://haxe.org/download/file/3.2.0-rc.1/haxe-3.2.0-rc1-osx.tar.gz)**
* **[Linux 32-bit binaries](http://haxe.org/download/file/3.2.0-rc.1/haxe-3.2.0-rc1-linux32.tar.gz)**
* **[Linux 64-bit binaries](http://haxe.org/download/file/3.2.0-rc.1/haxe-3.2.0-rc1-linux64.tar.gz)**
The latest stable release is [Haxe 3.2.0-rc2](http://haxe.org/download/version/3.2.0-rc.2/). Pre-built binaries are available for your platform:

* **[Windows installer](http://haxe.org/download/file/3.2.0-rc.2/haxe-3.2.0-rc2-win.exe)**
* **[Windows binaries](http://haxe.org/download/file/3.2.0-rc.2/haxe-3.2.0-rc2-win.zip)**
* **[OSX installer](http://haxe.org/download/file/3.2.0-rc.2/haxe-3.2.0-rc2-osx-installer.pkg)**
* **[OSX binaries](http://haxe.org/download/file/3.2.0-rc.2/haxe-3.2.0-rc2-osx.tar.gz)**
* **[Linux 32-bit binaries](http://haxe.org/download/file/3.2.0-rc.2/haxe-3.2.0-rc2-linux32.tar.gz)**
* **[Linux 64-bit binaries](http://haxe.org/download/file/3.2.0-rc.2/haxe-3.2.0-rc2-linux64.tar.gz)**

Automated development builds are available from [build.haxe.org](http://build.haxe.org).

Expand Down
1 change: 1 addition & 0 deletions analyzer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ module Simplifier = struct
with Exit ->
begin match follow e.etype with
| TAbstract({a_path = [],"Void"},_) -> true
| TInst ({ cl_path = [],"Array" }, _) when com.platform = Cpp -> true
| _ -> false
end
in
Expand Down
56 changes: 30 additions & 26 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,64 @@ os: unstable #http://help.appveyor.com/discussions/suggestions/427-pre-install-c
platform:
- Win32

clone_folder: C:/projects/haxe

environment:
global:
NEKO_ROOT: C:/projects/neko
HAXELIB_ROOT: C:/projects/haxelib
CYG_ARCH: x86
CYG_ROOT: C:/cygwin
CYG_SETUP: C:/cygwin/setup-x86.exe
MINGW_ARCH: i686
WODI: wodi32
ADD_REVISION: 1
OCAMLOPT: ocamlopt.opt
matrix:
- CYG_ARCH: x86
CYG_ROOT: C:/cygwin
CYG_SETUP: C:/cygwin/setup-x86.exe
WODI_ARCH: 32
MINGW_ARCH: i686
# - CYG_ARCH: x86_64
# CYG_ROOT: C:/cygwin64
# WODI_ARCH: 64
# MINGW_ARCH: x86_64
- TEST: "neko,cs,java,macro"
- TEST: "cpp"

init:
- 'echo System architecture: %PLATFORM%'
skip_tags: true

install:
- 'git submodule update --init --recursive'
- cinst 7zip.commandline -y
# Install ocaml using wodi
- '%CYG_ROOT%/setup-%CYG_ARCH%.exe -q -R "%CYG_ROOT%" -P dos2unix -P diffutils -P cpio -P make -P patch -P mingw64-%MINGW_ARCH%-gcc-core -P mingw64-%MINGW_ARCH%-gcc-g++ >NUL'
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
- '%CYG_ROOT%/bin/bash -lc "wget -q http://ml.ignorelist.com/wodi/8/wodi%WODI_ARCH%.tar.xz -O /tmp/wodi%WODI_ARCH%.tar.xz"'
- '%CYG_ROOT%/bin/bash -lc "cd /tmp && rm -rf wodi%WODI_ARCH% && tar -xf wodi%WODI_ARCH%.tar.xz && bash wodi%WODI_ARCH%/install.sh"'
- '%CYG_ROOT%/bin/bash -lc "godi_add godi-zip"'
- 'set PATH=%PATH%;%CYG_ROOT%/opt/wodi%WODI_ARCH%/bin'
- appveyor DownloadFile "http://cygwin.com/setup-%CYG_ARCH%.exe" -FileName "%CYG_ROOT%\setup.exe"
- '%CYG_ROOT%/setup.exe -g -q -R "%CYG_ROOT%" -P dos2unix -P diffutils -P cpio -P make -P patch -P mingw64-%MINGW_ARCH%-gcc-core -P mingw64-%MINGW_ARCH%-gcc-g++ > log.txt || type log.txt'
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin" > log.txt || type log.txt'
# The archive is a dropbox hosted version of https://github.com/fdopen/godi-repo/issues/7#issuecomment-98480339
- '%CYG_ROOT%/bin/bash -lc "wget -q https://dl.dropboxusercontent.com/u/2661116/wodi/%WODI%.tar.xz -O /tmp/%WODI%.tar.xz" > log.txt || type log.txt'
- '%CYG_ROOT%/bin/bash -lc "cd /tmp && rm -rf %WODI% && tar -xf %WODI%.tar.xz && bash %WODI%/install.sh" > log.txt || type log.txt'
- '%CYG_ROOT%/bin/bash -lc "godi_add godi-zip" > log.txt || type log.txt'
- 'set PATH=%PATH%;%CYG_ROOT%/opt/%WODI%/bin'
# Install neko
- cinst make -y
- 'git clone --recursive https://github.com/HaxeFoundation/neko.git %NEKO_ROOT%'
- 'cd %NEKO_ROOT%'
- set PATH=%PATH%;%NEKO_ROOT%/bin
- msbuild neko_vc10.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild libs/libs_vc10.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild neko_vc10.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" > log.txt || type log.txt
- msbuild libs/libs_vc10.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" > log.txt || type log.txt
- copy /y libs\include\gc\gc.dll bin
- cd %NEKO_ROOT%/src
- neko ../boot/nekoc tools/install.neko
- neko tools/install -nolibs
- neko tools/install -nolibs > log.txt || type log.txt
- neko -version

build_script:
- 'cd %APPVEYOR_BUILD_FOLDER%'
- 'set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -f Makefile.win WODI=wodi%WODI_ARCH% OCAMLOPT=ocamlopt.opt"'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -f Makefile.win WODI=wodi%WODI_ARCH% OCAMLOPT=ocamlopt.opt tools"'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win"'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win tools"'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win package_bin"'
- dir %APPVEYOR_BUILD_FOLDER%\out
- cd %APPVEYOR_BUILD_FOLDER%/tests/
- mkdir "%HAXELIB_ROOT%"
- haxelib setup "%HAXELIB_ROOT%"
- haxelib git hx-yaml https://github.com/mikestead/hx-yaml master src

test_script:
- cd %APPVEYOR_BUILD_FOLDER%/tests/
- haxe -version
- haxe -neko RunCi.n -main RunCi -lib hx-yaml
- haxe RunCi.hxml
- neko RunCi.n

artifacts:
- path: out/haxe_*.zip
2 changes: 2 additions & 0 deletions ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ module Meta = struct
| NoDoc
| NoExpr
| NoImportGlobal
| NonVirtual
| NoPackageRestrict
| NoPrivateAccess
| NoStack
| NotNull
| NoUsing
Expand Down
5 changes: 2 additions & 3 deletions common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ module Define = struct
| SwfScriptTimeout
| SwfUseDoAbc
| Sys
| Unity46LineNumbers
| Unsafe
| UseNekoc
| UseRttiDoc
Expand Down Expand Up @@ -325,8 +324,6 @@ module Define = struct
| SwfScriptTimeout -> ("swf_script_timeout", "Maximum ActionScript processing time before script stuck dialog box displays (in seconds)")
| SwfUseDoAbc -> ("swf_use_doabc", "Use DoAbc swf-tag instead of DoAbcDefine")
| Sys -> ("sys","Defined for all system platforms")
(* see https://github.com/HaxeFoundation/haxe/issues/3759 *)
| Unity46LineNumbers -> ("unity46_line_numbers", "Fixes line numbers in generated C# files for Unity 4.6 Mono compiler")
| Unsafe -> ("unsafe","Allow unsafe code when targeting C#")
| UseNekoc -> ("use_nekoc","Use nekoc compiler instead of internal one")
| UseRttiDoc -> ("use_rtti_doc","Allows access to documentation during compilation")
Expand Down Expand Up @@ -447,7 +444,9 @@ module MetaInfo = struct
| NoDoc -> ":noDoc",("Prevents a type from being included in documentation generation",[])
| NoExpr -> ":noExpr",("Internally used to mark abstract fields which have no expression by design",[Internal])
| NoImportGlobal -> ":noImportGlobal",("Prevents a static field from being imported with import Class.*",[UsedOn TAnyField])
| NonVirtual -> ":nonVirtual",("Declares function to be non-virtual in cpp",[Platform Cpp])
| NoPackageRestrict -> ":noPackageRestrict",("Allows a module to be accessed across all targets if found on its first type",[Internal])
| NoPrivateAccess -> ":noPrivateAccess",("Disallow private access to anything for the annotated expression",[UsedOn TExpr])
| NoStack -> ":noStack",("",[Platform Cpp])
| NotNull -> ":notNull",("Declares an abstract type as not accepting null values",[UsedOn TAbstract])
| NoUsing -> ":noUsing",("Prevents a field from being used with 'using'",[UsedOn TClassField])
Expand Down
Loading

0 comments on commit 77d171b

Please sign in to comment.