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

V2 - finally! #123

Merged
merged 98 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
59283d3
Bump haxe.
back2dos Jun 2, 2020
8d03142
Add Disposable
back2dos Jun 2, 2020
fd06828
Make callbacklist disposable.
back2dos Jun 2, 2020
05297d4
Simplify destructive callbacklist invocation.
back2dos Jun 2, 2020
325d183
Allow attaching disposables to one another.
back2dos Jun 2, 2020
bd8d98d
Start making signals disposable.
back2dos Jun 2, 2020
11f700a
More fun with disposable signals.
back2dos Jun 5, 2020
7a634c7
Tweak disposable API.
back2dos Jun 6, 2020
b439823
Implement Signal::join on suspendables.
back2dos Jun 6, 2020
9e5ae8e
Flesh out disposable docs and provide basic implementation.
back2dos Jun 6, 2020
1475db0
Implement CallbackList over SimpleDisposable.
back2dos Jun 6, 2020
c319cf9
Signals can't call back immediately.
back2dos Jun 6, 2020
44a25b7
Implement all signal transforms over suspendable.
back2dos Jun 6, 2020
dcc2b56
Implement all signal transforms suspendable signals. Deprecate gather…
back2dos Jun 6, 2020
d62ba05
Remove more old signal code.
back2dos Jun 6, 2020
2b55d26
Drop Haxe 4.
back2dos Jun 6, 2020
33126f4
Note to self.
back2dos Jun 6, 2020
af958e9
More tweaks of suspendable signals.
back2dos Jun 6, 2020
e492820
Add more tests to suspendables.
back2dos Jun 6, 2020
1164ae0
Add Signal::pickNext.
back2dos Jun 6, 2020
b34cf38
Reimplement progress.
back2dos Jun 6, 2020
f829b37
Deprecate >> on futures.
back2dos Jun 6, 2020
9e2d48d
Add Lazy::computed.
back2dos Jun 6, 2020
47b3f0a
Add FutureStatus.
back2dos Jun 6, 2020
74af11e
Fix bug in SyncFuture::eager.
back2dos Jun 6, 2020
437c8ff
Bump libs.
back2dos Jun 6, 2020
642ca4b
Delete obsolete batch file.
back2dos Jun 7, 2020
5e4b77f
Consolidate v2 attempts.
back2dos Jun 7, 2020
e2f8c40
Tests passing.
back2dos Jun 7, 2020
249a5ef
Add CallbackLinkRef.
back2dos Jun 8, 2020
c132480
Tweak Signal::pickNext and implement nextTime over it.
back2dos Jun 8, 2020
066511f
Various tweaks to Future and fix ofMany.
back2dos Jun 8, 2020
ac988bb
Move map/flatMap back from FutureObject ot Future. Noop out gather an…
back2dos Jun 8, 2020
a215583
Improve implementation of Future::first.
back2dos Jun 8, 2020
775c8c6
Use final instead of var where possible.
back2dos Jun 8, 2020
1a5c6b3
Uninline a few things.
back2dos Jun 8, 2020
1ad6592
Whitespace.
back2dos Jun 8, 2020
47f76e1
OCD.
back2dos Jun 8, 2020
6ba6e47
Unbreak tests.
back2dos Jun 8, 2020
a3ff8aa
Expose stack overflow guard. Use from CallbackList, rather than Callb…
back2dos Jun 8, 2020
5ca3785
Remove some long deprecated casts.
back2dos Jun 8, 2020
e2256d4
Bump Haxe.
back2dos Jun 8, 2020
8a7d7bc
Actually fix tests.
back2dos Jun 8, 2020
dfc17d7
Delete obsolete code (related to gathering).
back2dos Jun 8, 2020
214794a
Note to self. Fix edge case in eager.
back2dos Jun 8, 2020
134fa4d
Reduce noise in test output.
back2dos Jun 8, 2020
fbdd5ce
Sidestep cpp issue (I hope).
back2dos Jun 8, 2020
4313437
Get rid of Int64 deprecation warnings.
back2dos Jun 8, 2020
09c3c39
Bump backend support libs.
back2dos Jun 8, 2020
8b26398
Fix typo.
back2dos Jun 8, 2020
363f39b
Reorder things a little.
back2dos Jun 8, 2020
e84e5f8
OCD.
back2dos Jun 8, 2020
7fe0cf7
Wrap SuspendableFuture::wakeup in stackoverflow guard.
back2dos Jun 8, 2020
ac4f631
Use git version of hxcpp.
back2dos Jun 8, 2020
6ffdfc6
Remove some obsolete conditional compilation.
back2dos Jun 8, 2020
c0cb2d9
Manually compile hxcpp.
back2dos Jun 8, 2020
8b02483
Resolves #71.
back2dos Jun 8, 2020
e9b5c54
Bump hxnodejs
back2dos Jun 8, 2020
73b425b
Tweak suspendable signals.
back2dos Jun 8, 2020
9d255c8
Make Future.async work as before.
back2dos Jun 8, 2020
1214cbc
Minor simplification.
back2dos Jun 8, 2020
e4a4aa1
Remove more conditional compilation to support ancient haxe versions.
back2dos Jun 8, 2020
d0640c3
Resolves #119.
back2dos Jun 8, 2020
c6eb394
Note to self.
back2dos Jun 8, 2020
be37e9b
No luck ...
back2dos Jun 8, 2020
9a58c12
Undeprecate Future.async for now.
back2dos Jun 9, 2020
6e10c06
A little note about the behavior of Future.ofMany.
back2dos Jun 9, 2020
27958f7
Slight simplification.
back2dos Jun 9, 2020
a6a7cfc
Guard all callbacks, except when called from CallbackList.
back2dos Jun 9, 2020
b018165
Unified implementation for Promise.inParallel/inSequence.
back2dos Jun 9, 2020
8d9a22e
Simplify FutureStatus.
back2dos Jun 9, 2020
7cbadba
Compile tests for node in dev.
back2dos Jun 11, 2020
9d0cbeb
Optimize for sync promises.
back2dos Jun 11, 2020
acf8fbe
Faster flatMap for sync futures.
back2dos Jun 11, 2020
62911cc
Failing test for stackoverflow in Lazy.
back2dos Jun 11, 2020
709a143
Skip lazy stackoverlow test for now.
back2dos Jun 11, 2020
a27c76c
Make lazy stackoverflow protection work for straight forward cases.
back2dos Jun 11, 2020
d81130f
Make a few more implementations status aware. Avoid wrapping in Futur…
back2dos Jun 11, 2020
f47a223
Unify implementation for inSequence/inParallel for both Future and Pr…
back2dos Jun 11, 2020
395df41
Note to self.
back2dos Jun 11, 2020
a2b4c34
Reduce API surface a bit more.
back2dos Jun 11, 2020
78bc719
Resolves #3.
back2dos Jun 11, 2020
8e43451
Resolves #55.
back2dos Jun 11, 2020
641287d
Deprecate Future.async
back2dos Jun 11, 2020
ef187d0
Fix nullability vs. static targets.
back2dos Jun 11, 2020
e86cb32
Recommend `new Future` over `Future.irreversible`
back2dos Jun 11, 2020
aeec16a
Fix Annex for constrained mono magic.
back2dos Jun 11, 2020
c0b2578
Remove obsolete (due to @:using) alias.
back2dos Jun 11, 2020
70f1808
Don't use tink.CoreApi inside tink.core itself (related to #119)
nadako Jun 11, 2020
e143686
Undeprecate Signal.new.
back2dos Jun 11, 2020
b5b42fb
Reexpose OutcomeTools.
back2dos Jun 11, 2020
8e833bd
Drop Signal.create for new Signal.
back2dos Jun 11, 2020
0dc5b89
Merge pull request #124 from nadako/no_coreApi
back2dos Jun 11, 2020
8a89552
Haxe4. The Future is now!
back2dos Jun 11, 2020
9b09d4e
Skip Haxe 3 in gh actions.
back2dos Jun 11, 2020
83bda9c
Add test for Signal.generate.
back2dos Jun 11, 2020
1e4eaf3
A few notes about behavior.
back2dos Jun 11, 2020
2f7e057
Merge branch 'v2_again' of https://github.com/haxetink/tink_core into…
back2dos Jun 11, 2020
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
8 changes: 0 additions & 8 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,18 @@ jobs:
strategy:
matrix:
haxe-version:
- 3.4.7
- stable
- nightly
target:
- interp
- node
- node -D tink_core_no_error_pos
- neko
- neko
- python
- php
- cpp
- js
- java -D jvm
exclude:
# jvm only works on nightly for now
- haxe-version: 3.4.7
target: java -D jvm
- haxe-version: stable
target: java -D jvm

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
bin
/bin
/node_modules
2 changes: 1 addition & 1 deletion .haxerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "4.0.0-rc.5",
"version": "4.1.1",
"resolveLibs": "scoped"
}
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:
- deploy

language: node_js
node_js: 8
node_js: 12

cache:
directories:
Expand All @@ -17,23 +17,22 @@ os:
# - osx

env:
- HAXE_VERSION=3.3.0-rc.1
- HAXE_VERSION=3.4.7
- HAXE_VERSION=stable
- HAXE_VERSION=nightly

install:
- npm i -g lix
- lix install haxe $HAXE_VERSION
- lix download

script:
- lix run travix interp
- lix run travix neko
- lix run travix python
- lix run travix node
- lix run travix node -D tink_core_no_error_pos
# - lix run travix flash
# - lix run travix java
- lix run travix java -D jvm
# - lix run travix cs
- lix run travix js
- lix run travix cpp
Expand Down
10 changes: 0 additions & 10 deletions .vscode/settings.json

This file was deleted.

6 changes: 0 additions & 6 deletions .vscode/tasks.json

This file was deleted.

4 changes: 0 additions & 4 deletions Run.bat

This file was deleted.

3 changes: 2 additions & 1 deletion dev.hxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-cp src
tests.hxml
-lib travix
-neko bin/tests.n
-lib hxnodejs
-js bin/tests.js
4 changes: 2 additions & 2 deletions haxe_libraries/ansi.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @install: lix --silent download haxelib:ansi#1.0.0 into ansi/1.0.0/haxelib
-D ansi=1.0.0
# @install: lix --silent download "haxelib:/ansi#1.0.0" into ansi/1.0.0/haxelib
-cp ${HAXE_LIBCACHE}/ansi/1.0.0/haxelib/src
-cp ${HAXESHIM_LIBCACHE}/ansi/1.0.0/haxelib/src
6 changes: 3 additions & 3 deletions haxe_libraries/deep_equal.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-D deep_equal=0.3.0
# @install: lix --silent download "gh://github.com/kevinresol/deep_equal#07aea35baef0b366e72ab7557966014da100b972" into deep_equal/0.3.0/github/07aea35baef0b366e72ab7557966014da100b972
-cp ${HAXE_LIBCACHE}/deep_equal/0.3.0/github/07aea35baef0b366e72ab7557966014da100b972/src
# @install: lix --silent download "gh://github.com/kevinresol/deep_equal#ed53383b138038b97d1676ec6d63e47248a6df2f" into deep_equal/0.3.2/github/ed53383b138038b97d1676ec6d63e47248a6df2f
-cp ${HAXE_LIBCACHE}/deep_equal/0.3.2/github/ed53383b138038b97d1676ec6d63e47248a6df2f/src
-D deep_equal=0.3.2
9 changes: 5 additions & 4 deletions haxe_libraries/hxcpp.hxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-D hxcpp=4.0.8
# @install: lix --silent download "haxelib:/hxcpp#4.0.8" into hxcpp/4.0.8/haxelib
# @run: haxelib run-dir hxcpp ${HAXE_LIBCACHE}/hxcpp/4.0.8/haxelib
-cp ${HAXE_LIBCACHE}/hxcpp/4.0.8/haxelib/
# @install: lix --silent download "gh://github.com/HaxeFoundation/hxcpp#6944e4d8bc9fe8546473ac9290ee001e7d894019" into hxcpp/4.1.0/github/6944e4d8bc9fe8546473ac9290ee001e7d894019
# @run: haxelib run-dir hxcpp ${HAXE_LIBCACHE}/hxcpp/4.1.0/github/6944e4d8bc9fe8546473ac9290ee001e7d894019
# @post-install: cd ${HAXE_LIBCACHE}/hxcpp/4.1.0/github/6944e4d8bc9fe8546473ac9290ee001e7d894019/tools/hxcpp && haxe compile.hxml
-cp ${HAXE_LIBCACHE}/hxcpp/4.1.0/github/6944e4d8bc9fe8546473ac9290ee001e7d894019/
-D hxcpp=4.1.0
8 changes: 4 additions & 4 deletions haxe_libraries/hxcs.hxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-D hxcs=4.0.0-alpha
# @install: lix --silent download "haxelib:/hxcs#4.0.0-alpha" into hxcs/4.0.0-alpha/haxelib
# @run: haxelib run-dir hxcs ${HAXE_LIBCACHE}/hxcs/4.0.0-alpha/haxelib
-cp ${HAXE_LIBCACHE}/hxcs/4.0.0-alpha/haxelib/
# @install: lix --silent download "haxelib:/hxcs#3.4.0" into hxcs/3.4.0/haxelib
# @run: haxelib run-dir hxcs ${HAXE_LIBCACHE}/hxcs/3.4.0/haxelib
-cp ${HAXE_LIBCACHE}/hxcs/3.4.0/haxelib/
-D hxcs=3.4.0
10 changes: 5 additions & 5 deletions haxe_libraries/hxjava.hxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-D hxjava=4.0.0-alpha
# @install: lix --silent download "haxelib:/hxjava#4.0.0-alpha" into hxjava/4.0.0-alpha/haxelib
# @run: haxelib run-dir hxjava ${HAXE_LIBCACHE}/hxjava/4.0.0-alpha/haxelib
-cp ${HAXE_LIBCACHE}/hxjava/4.0.0-alpha/haxelib/
-java-lib lib/hxjava-std.jar
# @install: lix --silent download "haxelib:/hxjava#3.2.0" into hxjava/3.2.0/haxelib
# @run: haxelib run-dir hxjava ${HAXE_LIBCACHE}/hxjava/3.2.0/haxelib
-cp ${HAXE_LIBCACHE}/hxjava/3.2.0/haxelib/
-D hxjava=3.2.0
-java-lib lib/hxjava-std.jar
7 changes: 4 additions & 3 deletions haxe_libraries/hxnodejs.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-D hxnodejs=10.0.0
# @install: lix --silent download "haxelib:/hxnodejs#10.0.0" into hxnodejs/10.0.0/haxelib
-cp ${HAXE_LIBCACHE}/hxnodejs/10.0.0/haxelib/src
# @install: lix --silent download "haxelib:/hxnodejs#12.1.0" into hxnodejs/12.1.0/haxelib
-cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/haxelib/src
-D hxnodejs=12.1.0
--macro allowPackage('sys')
# should behave like other target defines and not be defined in macro context
--macro define('nodejs')
--macro _internal.SuppressDeprecated.run()
6 changes: 3 additions & 3 deletions haxe_libraries/tink_chunk.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-D tink_chunk=0.3.0
# @install: lix --silent download "haxelib:/tink_chunk#0.3.0" into tink_chunk/0.3.0/haxelib
-cp ${HAXE_LIBCACHE}/tink_chunk/0.3.0/haxelib/src
# @install: lix --silent download "haxelib:/tink_chunk#0.3.1" into tink_chunk/0.3.1/haxelib
-cp ${HAXE_LIBCACHE}/tink_chunk/0.3.1/haxelib/src
-D tink_chunk=0.3.1
6 changes: 3 additions & 3 deletions haxe_libraries/tink_cli.hxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-D tink_cli=0.4.1
# @install: lix --silent download "haxelib:/tink_cli#0.4.1" into tink_cli/0.4.1/haxelib
# @install: lix --silent download "haxelib:/tink_cli#0.5.1" into tink_cli/0.5.1/haxelib
-lib tink_io
-lib tink_macro
-lib tink_stringly
-cp ${HAXE_LIBCACHE}/tink_cli/0.4.1/haxelib/src
-cp ${HAXE_LIBCACHE}/tink_cli/0.5.1/haxelib/src
-D tink_cli=0.5.1
# Make sure docs are generated
-D use-rtti-doc
6 changes: 3 additions & 3 deletions haxe_libraries/tink_io.hxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-D tink_io=0.7.0
# @install: lix --silent download "haxelib:/tink_io#0.7.0" into tink_io/0.7.0/haxelib
# @install: lix --silent download "haxelib:/tink_io#0.8.0" into tink_io/0.8.0/haxelib
-lib tink_chunk
-lib tink_streams
-cp ${HAXE_LIBCACHE}/tink_io/0.7.0/haxelib/src
-cp ${HAXE_LIBCACHE}/tink_io/0.8.0/haxelib/src
-D tink_io=0.8.0
6 changes: 3 additions & 3 deletions haxe_libraries/tink_macro.hxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-D tink_macro=0.18.0
# @install: lix --silent download "haxelib:/tink_macro#0.18.0" into tink_macro/0.18.0/haxelib
# @install: lix --silent download "haxelib:/tink_macro#0.19.1" into tink_macro/0.19.1/haxelib
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_macro/0.18.0/haxelib/src
-cp ${HAXE_LIBCACHE}/tink_macro/0.19.1/haxelib/src
-D tink_macro=0.19.1
4 changes: 2 additions & 2 deletions haxe_libraries/tink_priority.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @install: lix --silent download haxelib:tink_priority#0.1.3 into tink_priority/0.1.3/haxelib
-D tink_priority=0.1.3
# @install: lix --silent download "haxelib:/tink_priority#0.1.3" into tink_priority/0.1.3/haxelib
-cp ${HAXE_LIBCACHE}/tink_priority/0.1.3/haxelib/src
-cp ${HAXESHIM_LIBCACHE}/tink_priority/0.1.3/haxelib/src
6 changes: 3 additions & 3 deletions haxe_libraries/tink_streams.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-D tink_streams=0.3.2
# @install: lix --silent download "haxelib:/tink_streams#0.3.2" into tink_streams/0.3.2/haxelib
# @install: lix --silent download "haxelib:/tink_streams#0.3.3" into tink_streams/0.3.3/haxelib
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_streams/0.3.2/haxelib/src
-cp ${HAXE_LIBCACHE}/tink_streams/0.3.3/haxelib/src
-D tink_streams=0.3.3
# temp for development, delete this file when pure branch merged
-D pure
6 changes: 3 additions & 3 deletions haxe_libraries/tink_stringly.hxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-D tink_stringly=0.3.1
# @install: lix --silent download "haxelib:/tink_stringly#0.3.1" into tink_stringly/0.3.1/haxelib
# @install: lix --silent download "haxelib:/tink_stringly#0.4.0" into tink_stringly/0.4.0/haxelib
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_stringly/0.3.1/haxelib/src
-cp ${HAXE_LIBCACHE}/tink_stringly/0.4.0/haxelib/src
-D tink_stringly=0.4.0
8 changes: 4 additions & 4 deletions haxe_libraries/tink_syntaxhub.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @install: lix --silent download https://github.com/haxetink/tink_syntaxhub/archive/b8a7e51a48c002cbeedb873f6cec177dbec9b8fd.tar.gz into tink_syntaxhub/0.3.6/github/b8a7e51a48c002cbeedb873f6cec177dbec9b8fd
-D tink_syntaxhub=0.3.6
# @install: lix --silent download "gh://github.com/haxetink/tink_syntaxhub#cfc78672e72a2a557bd383332525e17eb9802f79" into tink_syntaxhub/0.3.6/github/cfc78672e72a2a557bd383332525e17eb9802f79
-cp ${HAXESHIM_LIBCACHE}/tink_syntaxhub/0.3.6/github/b8a7e51a48c002cbeedb873f6cec177dbec9b8fd/src
--macro tink.SyntaxHub.use()
-lib tink_priority
-lib tink_macro
-cp ${HAXE_LIBCACHE}/tink_syntaxhub/0.3.6/github/cfc78672e72a2a557bd383332525e17eb9802f79/src
--macro tink.SyntaxHub.use()
-lib tink_macro
6 changes: 3 additions & 3 deletions haxe_libraries/tink_testrunner.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-D tink_testrunner=0.7.2
# @install: lix --silent download "gh://github.com/haxetink/tink_testrunner#5066b09848994f08c829ccecb6cfe0a46d157be5" into tink_testrunner/0.7.2/github/5066b09848994f08c829ccecb6cfe0a46d157be5
-D tink_testrunner=0.7.1
# @install: lix --silent download "gh://github.com/haxetink/tink_testrunner#1928e3a72a4ae2d69b3a38350a6e1bdd89bdead9" into tink_testrunner/0.7.1/github/1928e3a72a4ae2d69b3a38350a6e1bdd89bdead9
-lib ansi
-lib tink_macro
-lib tink_streams
-cp ${HAXE_LIBCACHE}/tink_testrunner/0.7.2/github/5066b09848994f08c829ccecb6cfe0a46d157be5/src
-cp ${HAXE_LIBCACHE}/tink_testrunner/0.7.1/github/1928e3a72a4ae2d69b3a38350a6e1bdd89bdead9/src
6 changes: 3 additions & 3 deletions haxe_libraries/tink_unittest.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-D tink_unittest=0.6.2
# @install: lix --silent download "gh://github.com/haxetink/tink_unittest#b9df9a25bdac55d81e48d1e91d1aece419dfb9c9" into tink_unittest/0.6.2/github/b9df9a25bdac55d81e48d1e91d1aece419dfb9c9
# @install: lix --silent download "gh://github.com/haxetink/tink_unittest#90ef98109c82f4d4a1ae458efc623465533c692b" into tink_unittest/0.7.0/github/90ef98109c82f4d4a1ae458efc623465533c692b
-lib tink_syntaxhub
-lib tink_testrunner
-cp ${HAXE_LIBCACHE}/tink_unittest/0.6.2/github/b9df9a25bdac55d81e48d1e91d1aece419dfb9c9/src
-cp ${HAXE_LIBCACHE}/tink_unittest/0.7.0/github/90ef98109c82f4d4a1ae458efc623465533c692b/src
-D tink_unittest=0.7.0
--macro tink.unit.AssertionBufferInjector.use()
11 changes: 6 additions & 5 deletions haxe_libraries/travix.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-D travix=0.13.1
# @install: lix --silent download "haxelib:/travix#0.13.1" into travix/0.13.1/haxelib
# @post-install: cd ${HAXE_LIBCACHE}/travix/0.13.1/haxelib && haxe -cp src --run travix.PostDownload
# @run: haxelib run-dir travix ${HAXE_LIBCACHE}/travix/0.13.1/haxelib
# @install: lix --silent download "haxelib:/travix#0.14.1" into travix/0.14.1/haxelib
# @post-install: cd ${HAXE_LIBCACHE}/travix/0.14.1/haxelib && haxe -cp src --run travix.PostDownload
# @run: haxelib run-dir travix ${HAXE_LIBCACHE}/travix/0.14.1/haxelib
-lib tink_cli
-cp ${HAXE_LIBCACHE}/travix/0.13.1/haxelib/src
-cp ${HAXE_LIBCACHE}/travix/0.14.1/haxelib/src
-D travix=0.14.1
--macro travix.Macro.setup()
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"contributors": [
"back2dos"
],
"version": "1.26.0",
"releasenote": "Add Future.isFuture and Progress. Plus some bug fixes",
"version": "2.0.0-alpha",
"releasenote": "Improve JS interop. Use latest Haxe 4. Add Lazy.NULL.",
"tags": [
"tink",
"cross",
Expand Down
2 changes: 1 addition & 1 deletion src/tink/CoreApi.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typedef FutureTrigger<T> = tink.core.Future.FutureTrigger<T>;
typedef PromiseTrigger<T> = tink.core.Promise.PromiseTrigger<T>;

typedef Outcome<D, F> = tink.core.Outcome<D, F>;
typedef OutcomeTools = tink.core.Outcome.OutcomeTools;
back2dos marked this conversation as resolved.
Show resolved Hide resolved
@:noCompletion typedef OutcomeTools = tink.core.Outcome.OutcomeTools;

typedef Either<L, R> = tink.core.Either<L, R>;
typedef Option<T> = tink.core.Option<T>;
Expand Down
19 changes: 8 additions & 11 deletions src/tink/core/Annex.hx
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
package tink.core;

private typedef AnnexableTo<T> =
#if (haxe_ver >= 3.4)
haxe.Constraints.Constructible<T->Void>
#else
{ function new(targeT:T):Void; }
#end
private typedef AnnexableTo<T> = haxe.Constraints.Constructible<T->Void>

#if (java || cs) @:dce #end // this make sure the generic method is not genrated
class Annex<Target> {

var target:Target;
var registry:Map<Dynamic, Dynamic>;
var registry:Map<{}, Dynamic>;

public function new(target:Target) {
this.target = target;
this.registry = cast new haxe.ds.ObjectMap();
}
#if (java || cs) @:extern #end
@:generic public inline function get<A:AnnexableTo<Target>>(c:Class<A>):A
@:generic public inline function get<A:AnnexableTo<Target>>(c:Class<A>):A {
var c:{} = cast c;
return switch registry[c] {
case null: registry[c] = new A(target);
case v: v;
}
}
}
}
8 changes: 1 addition & 7 deletions src/tink/core/Any.hx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
package tink.core;

#if (haxe_ver >= 3.4)
typedef Any = std.Any;
#else
abstract Any(Dynamic) from Dynamic {
@:noCompletion @:to inline function __promote<A>():A return this;
}
#end
typedef Any = std.Any;
Loading