ldk-java
19 months agoMerge pull request #119 from TheBlueMatt/main v0.0.111.0
Matt Corallo [Mon, 3 Oct 2022 22:28:51 +0000 (22:28 +0000)]
Merge pull request #119 from TheBlueMatt/main

Update to 0.0.111

19 months ago[TS] Update auto-generated TS bindings
Matt Corallo [Fri, 30 Sep 2022 01:04:14 +0000 (01:04 +0000)]
[TS] Update auto-generated TS bindings

19 months ago[Java] Update auto-generated Java files
Matt Corallo [Thu, 29 Sep 2022 23:05:40 +0000 (23:05 +0000)]
[Java] Update auto-generated Java files

19 months ago[TS] Test OnionMessenger in TypeScript tests
Matt Corallo [Mon, 3 Oct 2022 20:33:51 +0000 (20:33 +0000)]
[TS] Test OnionMessenger in TypeScript tests

19 months ago[Java] Update ChannelManagerConstructor and tests to latest API
Matt Corallo [Fri, 30 Sep 2022 01:07:46 +0000 (01:07 +0000)]
[Java] Update ChannelManagerConstructor and tests to latest API

19 months ago[TS] Update typescript tests to latest upstream API
Matt Corallo [Fri, 30 Sep 2022 01:05:59 +0000 (01:05 +0000)]
[TS] Update typescript tests to latest upstream API

19 months agoUpdate CI references to 0.0.111
Matt Corallo [Mon, 3 Oct 2022 21:27:56 +0000 (21:27 +0000)]
Update CI references to 0.0.111

19 months ago[TS] Fix generation for traits that have supertraits
Matt Corallo [Mon, 3 Oct 2022 20:07:28 +0000 (20:07 +0000)]
[TS] Fix generation for traits that have supertraits

When we have a trait with a supertrait, we have to pass both the
main- and super-trait instance indxes through to C so that it can
call both. We failed to do this, missing an argument entirely when
calling the C code.

Instead of trying to allocate a new instance index, we opt to store
instance indexes in trait structs (assuming there is one) and then
reuse the one in the constructed object.

19 months ago[TS] Correct TS call semantics for some function types
Matt Corallo [Sat, 1 Oct 2022 20:31:26 +0000 (20:31 +0000)]
[TS] Correct TS call semantics for some function types

TS functions now all return uint64_t, not uint32_t, for pointers.

19 months agoAllow trait methods to return NULL-able objects
Matt Corallo [Mon, 3 Oct 2022 20:36:31 +0000 (20:36 +0000)]
Allow trait methods to return NULL-able objects

The comment claiming this isn't supported in Java/TS is incorrect -
it works just fine with no further modifications.

19 months agoAdd support for mapping LDKBigEndianScalar manually, ala TxOut
Matt Corallo [Thu, 29 Sep 2022 22:41:08 +0000 (22:41 +0000)]
Add support for mapping LDKBigEndianScalar manually, ala TxOut

20 months agoMerge pull request #117 from TheBlueMatt/2022-08-fix-npe v0.0.110.3
Matt Corallo [Sat, 3 Sep 2022 22:32:32 +0000 (22:32 +0000)]
Merge pull request #117 from TheBlueMatt/2022-08-fix-npe

[TS+Java] Ensure we don't try to add a reference from null.

20 months ago[TS] Update auto-generated file
Matt Corallo [Sat, 3 Sep 2022 20:41:43 +0000 (20:41 +0000)]
[TS] Update auto-generated file

20 months ago[Java] Update auto-generated Java structs
Matt Corallo [Sat, 3 Sep 2022 20:28:21 +0000 (20:28 +0000)]
[Java] Update auto-generated Java structs

20 months ago[TS+Java] Ensure we don't try to add a reference from `null`.
Matt Corallo [Sat, 3 Sep 2022 20:24:10 +0000 (20:24 +0000)]
[TS+Java] Ensure we don't try to add a reference from `null`.

At least in `Event::PaymentPathFailed` if we try to map an event
with no `retry` we'll hit a `NullPointerException` as we'll try to
add a reference from the `null` retry back to the `Event` itself.

The simple fix is to simply exhaustively check for `null` before
adding references everywhere.

20 months agoMerge pull request #116 from TheBlueMatt/main
Matt Corallo [Mon, 15 Aug 2022 17:17:27 +0000 (17:17 +0000)]
Merge pull request #116 from TheBlueMatt/main

Handle socket errors (the same as socket closure)

20 months agoHandle socket errors (the same as socket closure)
Matt Corallo [Mon, 15 Aug 2022 15:24:52 +0000 (15:24 +0000)]
Handle socket errors (the same as socket closure)

`gr0kchain` on Discord reported that not handling "error" causes
us to get unhandled exceptions, so we have to handle it.

20 months agoMerge pull request #115 from TheBlueMatt/main v0.0.110.2
Matt Corallo [Sat, 13 Aug 2022 20:09:26 +0000 (20:09 +0000)]
Merge pull request #115 from TheBlueMatt/main

20 months ago[TS] Update auto-generated TypeScript bindings
Matt Corallo [Sat, 13 Aug 2022 18:54:59 +0000 (18:54 +0000)]
[TS] Update auto-generated TypeScript bindings

20 months ago[Java] Update auto-generated Java bindings
Matt Corallo [Sat, 13 Aug 2022 18:03:00 +0000 (18:03 +0000)]
[Java] Update auto-generated Java bindings

20 months agoAdd test for gossip data fetching
Matt Corallo [Sat, 13 Aug 2022 18:00:47 +0000 (18:00 +0000)]
Add test for gossip data fetching

This tests the changes in  #114 for regression, and failed prior to
 #114.

20 months agoDrop clone on tuple-field-fetching
Matt Corallo [Sat, 13 Aug 2022 01:34:03 +0000 (01:34 +0000)]
Drop clone on tuple-field-fetching

Early in the lifetime of the bindings here tuple-field-fetching
had memory tracking issues which appear to have been solved now.
Thus, we can go ahead and drop the clone, at least for has-inner
types.

Fixes #84.

20 months agoMerge pull request #114 from TheBlueMatt/main
Matt Corallo [Sat, 13 Aug 2022 01:32:07 +0000 (01:32 +0000)]
Merge pull request #114 from TheBlueMatt/main

Change where the opaque struct is_owned bit is stored in pointers

20 months ago[Java] Update auto-generated Java bindings
Matt Corallo [Fri, 12 Aug 2022 23:35:47 +0000 (23:35 +0000)]
[Java] Update auto-generated Java bindings

20 months ago[TS] Update auto-generated TS bindings
Matt Corallo [Fri, 12 Aug 2022 23:18:41 +0000 (23:18 +0000)]
[TS] Update auto-generated TS bindings

20 months agoSwitch 32-bit platforms to using 64-bit "pointers"
Matt Corallo [Fri, 12 Aug 2022 23:08:17 +0000 (23:08 +0000)]
Switch 32-bit platforms to using 64-bit "pointers"

This much more cleanly fixes the issue described in the previous
commit by simply using 64-bit integers to represent pointers on
32-bit platforms, letting us store the required flag bit in the top
32-bits that are always free.

It does, however, imply changing the entire call semantics for
TypeScript to use BigInts for pointers, rather than numbers.

20 months agoChange where the opaque struct is_owned bit is stored in pointers
Matt Corallo [Thu, 11 Aug 2022 21:38:05 +0000 (21:38 +0000)]
Change where the opaque struct is_owned bit is stored in pointers

When we're returning a reference to an opaque struct, we previously
used the LSB to track the is_owned bit. This works for
heap-allocated structs just fine as `malloc` guarantees maximal
(usually 8-byte) alignment for all returned pointers. However, for
opaque structs which are actually a reference to a field in a
larger native Rust struct (eg `NodeId` in
`ChannelDetails_get_node_one`), this may not be the case. This
caused reading off-by-one `NodeId`s.

We fix this by adding a new set of utilities which handle tagging
and un-tagging pointers which are a bit more complicated. One
32-bit platforms, we simply use the low bit but will change that
in the next commit. However, on 64-bit platforms we have to be a
bit more careful. Modern 64-bit platforms, including Android, use
the top bits (8 bits in the case of android) for pointer
authentication. x86_64 sets the top 16 bits to the same value, but
they may be 1s or 0s. Thus, we use (9th bit) ^ (10th bit) as our
tag, assuming that they are always equal.

This isn't the most robust solution, but until there's time to
rewrite all the opaque object handling to fetch java fields from C
this is likely the best we're going to be able to do.

20 months agoMerge pull request #113 from TheBlueMatt/main v0.0.110.1
Matt Corallo [Sat, 6 Aug 2022 00:25:08 +0000 (00:25 +0000)]
Merge pull request #113 from TheBlueMatt/main

Update to latest LDK-C-Bindings and fix assorted TS bugs

21 months ago[Java] Update auto-generated Java bindings with new upstream getters
Matt Corallo [Fri, 5 Aug 2022 21:09:09 +0000 (21:09 +0000)]
[Java] Update auto-generated Java bindings with new upstream getters

21 months ago[TS] Update auto-generated bindings with changes + upstream changes
Matt Corallo [Thu, 4 Aug 2022 22:59:15 +0000 (22:59 +0000)]
[TS] Update auto-generated bindings with changes + upstream changes

21 months ago[TS] Ensure uint64_t arrays are 8-byte aligned by using an 8-byte len
Matt Corallo [Fri, 5 Aug 2022 20:24:46 +0000 (20:24 +0000)]
[TS] Ensure uint64_t arrays are 8-byte aligned by using an 8-byte len

21 months ago[TS] Redo C -> TS call function naming to make it harder to screw up
Matt Corallo [Fri, 5 Aug 2022 19:52:27 +0000 (19:52 +0000)]
[TS] Redo C -> TS call function naming to make it harder to screw up

21 months agoMerge pull request #112 from G8XSU/main
Matt Corallo [Fri, 5 Aug 2022 01:58:27 +0000 (01:58 +0000)]
Merge pull request #112 from G8XSU/main

Use Gnu-sed on macosx if available

21 months ago[TS] Call FinalizationRegistry.register with a unregister token
Matt Corallo [Fri, 5 Aug 2022 01:17:13 +0000 (01:17 +0000)]
[TS] Call FinalizationRegistry.register with a unregister token

We were assuming we could use `unregister` but weren't actually
passing an "unregister token", which causes unregister to not
function properly.

21 months ago[TS] Include substantially larger backtrace in testing
Matt Corallo [Fri, 5 Aug 2022 01:16:33 +0000 (01:16 +0000)]
[TS] Include substantially larger backtrace in testing

21 months ago[TS] Support lock structs by requiring manual free calls
Matt Corallo [Fri, 5 Aug 2022 00:54:08 +0000 (00:54 +0000)]
[TS] Support lock structs by requiring manual free calls

21 months ago[TS] Fix fd_write to match the ABI, quiet environ call logging
Matt Corallo [Thu, 4 Aug 2022 23:36:52 +0000 (23:36 +0000)]
[TS] Fix fd_write to match the ABI, quiet environ call logging

We need to return the bytes written via an extra argument that we
were leaving potentially-uninitialized.

21 months ago[TS] Support mapping returned uint64[]s from rust functions
Matt Corallo [Thu, 4 Aug 2022 22:56:43 +0000 (22:56 +0000)]
[TS] Support mapping returned uint64[]s from rust functions

21 months agoUse Gnu-sed on macosx if available
Gursharan Singh [Thu, 4 Aug 2022 23:19:45 +0000 (16:19 -0700)]
Use Gnu-sed on macosx if available

21 months agoMerge pull request #111 from TheBlueMatt/main
Matt Corallo [Thu, 28 Jul 2022 06:45:08 +0000 (06:45 +0000)]
Merge pull request #111 from TheBlueMatt/main

21 months ago[Java] Add a simple read lock call in HumanObjectPeerTest
Matt Corallo [Thu, 28 Jul 2022 05:40:56 +0000 (05:40 +0000)]
[Java] Add a simple read lock call in HumanObjectPeerTest

21 months ago[Java] Fix undefined behavior in HumanObjectPeerTest
Matt Corallo [Thu, 28 Jul 2022 03:29:27 +0000 (03:29 +0000)]
[Java] Fix undefined behavior in HumanObjectPeerTest

CI somehow convinced the access to custom_messages_to_send to
trigger an `ArrayIndexOutOfBoundsException`, which should not be
possible except in race cases due to threading issues. Adding the
missing synchronized block should address it.

21 months agoMerge pull request #110 from TheBlueMatt/main v0.0.110.0
Matt Corallo [Wed, 27 Jul 2022 23:42:13 +0000 (23:42 +0000)]
Merge pull request #110 from TheBlueMatt/main

Update to LDK 0.0.110

21 months ago[TS] Update auto-generated TS bindings to LDK 0.0.110
Matt Corallo [Wed, 27 Jul 2022 18:14:02 +0000 (18:14 +0000)]
[TS] Update auto-generated TS bindings to LDK 0.0.110

21 months ago[Java] Update auto-generated Java bindings to LDK 0.0.110
Matt Corallo [Wed, 27 Jul 2022 17:16:16 +0000 (17:16 +0000)]
[Java] Update auto-generated Java bindings to LDK 0.0.110

21 months ago[Java] Update tests to latest upstream API
Matt Corallo [Wed, 27 Jul 2022 18:12:37 +0000 (18:12 +0000)]
[Java] Update tests to latest upstream API

21 months agoUpdate CI references to LDK 0.0.110
Matt Corallo [Wed, 27 Jul 2022 17:14:24 +0000 (17:14 +0000)]
Update CI references to LDK 0.0.110

21 months agoMerge pull request #107 from TheBlueMatt/main
Matt Corallo [Sat, 23 Jul 2022 03:51:17 +0000 (03:51 +0000)]
Merge pull request #107 from TheBlueMatt/main

[TS] Properly export unitary enums such that they're in *.d.mjs

21 months ago[TS] Update auto-generated TS bindings
Matt Corallo [Tue, 5 Jul 2022 18:27:11 +0000 (18:27 +0000)]
[TS] Update auto-generated TS bindings

21 months ago[TS] Add a socket handling implementation that uses Node.JS's `net`
Matt Corallo [Fri, 22 Jul 2022 21:13:22 +0000 (21:13 +0000)]
[TS] Add a socket handling implementation that uses Node.JS's `net`

21 months ago[TS] Add additional node API interface bits for net
Matt Corallo [Fri, 22 Jul 2022 21:55:44 +0000 (21:55 +0000)]
[TS] Add additional node API interface bits for net

21 months ago[TS] Add missing space in array length error string
Matt Corallo [Fri, 22 Jul 2022 18:08:49 +0000 (18:08 +0000)]
[TS] Add missing space in array length error string

21 months ago[TS] Properly export unitary enums such that they're in *.d.mjs
Matt Corallo [Tue, 5 Jul 2022 18:18:54 +0000 (18:18 +0000)]
[TS] Properly export unitary enums such that they're in *.d.mjs

Because the `ts/enums/*` files simply re-export from `bindings.mts`
rather than defining the enum from scratch, we have to include docs
and cannot use /* @internal */ on the `bindings.mts` unitary enums.

21 months ago[Java] Strip Java binaries when compiling, not just wasm
Matt Corallo [Tue, 12 Jul 2022 18:49:17 +0000 (18:49 +0000)]
[Java] Strip Java binaries when compiling, not just wasm

21 months agoMerge pull request #109 from dunxen/patch-1
Matt Corallo [Fri, 15 Jul 2022 20:00:05 +0000 (20:00 +0000)]
Merge pull request #109 from dunxen/patch-1

Specify Node version for Wasm BigInt support

21 months agoSpecify Node version for Wasm BigInt support
Duncan Dean [Wed, 13 Jul 2022 13:36:27 +0000 (15:36 +0200)]
Specify Node version for Wasm BigInt support

From Node v15.0, Wasm BigInt support is no longer experimental

See: https://github.com/nodejs/node/commit/ca8f3ef2e5

22 months agoMerge pull request #106 from TheBlueMatt/main v0.0.109.0
Matt Corallo [Fri, 1 Jul 2022 23:46:33 +0000 (16:46 -0700)]
Merge pull request #106 from TheBlueMatt/main

0.0.109.0

22 months agoUpdate CI branches to 0.0.109
Matt Corallo [Fri, 1 Jul 2022 22:07:38 +0000 (22:07 +0000)]
Update CI branches to 0.0.109

22 months ago[TS] Update auto-generated TS bindings
Matt Corallo [Fri, 1 Jul 2022 22:05:45 +0000 (22:05 +0000)]
[TS] Update auto-generated TS bindings

22 months ago[Java] Update auto-generated Java bindings
Matt Corallo [Fri, 1 Jul 2022 21:55:48 +0000 (21:55 +0000)]
[Java] Update auto-generated Java bindings

22 months ago[Java] Update tests to match 0.0.109 API
Matt Corallo [Fri, 1 Jul 2022 21:57:19 +0000 (21:57 +0000)]
[Java] Update tests to match 0.0.109 API

22 months agoMerge pull request #104 from TheBlueMatt/main v0.0.108.1
Matt Corallo [Thu, 30 Jun 2022 21:34:00 +0000 (14:34 -0700)]
Merge pull request #104 from TheBlueMatt/main

Fix TS u64 call semantics (and test it)

22 months ago[TS] Explicitly include `index.d.mts` (and `.mjs`) in package
Matt Corallo [Thu, 30 Jun 2022 19:59:20 +0000 (19:59 +0000)]
[TS] Explicitly include `index.d.mts` (and `.mjs`) in package

As apparently npm doesn't include it just because its listed in
`types`.

22 months ago[TS] Auto-update version in package.json in genbindings.sh
Matt Corallo [Thu, 30 Jun 2022 19:55:19 +0000 (19:55 +0000)]
[TS] Auto-update version in package.json in genbindings.sh

22 months ago[TS] Update auto-generated typescript bindings
Matt Corallo [Thu, 30 Jun 2022 04:18:40 +0000 (04:18 +0000)]
[TS] Update auto-generated typescript bindings

22 months ago[TS] Add a test that uses `PeerManager` to exchange channel open
Matt Corallo [Thu, 30 Jun 2022 04:22:48 +0000 (04:22 +0000)]
[TS] Add a test that uses `PeerManager` to exchange channel open

22 months ago[TS] Fix typo in inconsistent-versions error message
Matt Corallo [Thu, 30 Jun 2022 17:09:52 +0000 (17:09 +0000)]
[TS] Fix typo in inconsistent-versions error message

22 months ago[TS] Free arrays passed as slices from TS -> C -> Rust
Matt Corallo [Thu, 30 Jun 2022 19:00:08 +0000 (19:00 +0000)]
[TS] Free arrays passed as slices from TS -> C -> Rust

22 months ago[TS] Split C -> JS function calls based on u32/u64 parameters/return
Matt Corallo [Thu, 30 Jun 2022 04:19:13 +0000 (04:19 +0000)]
[TS] Split C -> JS function calls based on u32/u64 parameters/return

We were calling all C -> JS functions with u32 parameters and
return types. This is fine for all of our pointers, as well as any
smaller types - u32 always gets mapped to a JavaScript `number`, so
its all consistent.

However, for u64 parameters/returns, we map the values to
JavaScript `bigint`s, which are not compatible with `numbers`, and
the correct type is checked at the FFI when returning or when users
ultimately try to use a passed `bigint` as if it were a `number`.

Thus, we have to split the `js_invoke_function` family by the
parameters and return values, using `u` for u32s and `b` for u64s
to do so.

22 months agoMerge pull request #103 from TheBlueMatt/main v0.0.108.0
Matt Corallo [Wed, 29 Jun 2022 21:03:39 +0000 (14:03 -0700)]
Merge pull request #103 from TheBlueMatt/main

0.0.108.0

22 months agoUpdate CI install to match latest debian bookworm state
Matt Corallo [Wed, 29 Jun 2022 04:20:20 +0000 (04:20 +0000)]
Update CI install to match latest debian bookworm state

22 months agoUpdate CI MacOS clang version to 14.0.5
Matt Corallo [Tue, 28 Jun 2022 22:43:47 +0000 (22:43 +0000)]
Update CI MacOS clang version to 14.0.5

22 months agoUpdate CI cbindgen install script to work with MSRV
Matt Corallo [Tue, 28 Jun 2022 22:05:12 +0000 (22:05 +0000)]
Update CI cbindgen install script to work with MSRV

22 months agoUpdate CI bindings branches and tags to 0.0.108
Matt Corallo [Mon, 27 Jun 2022 19:33:43 +0000 (19:33 +0000)]
Update CI bindings branches and tags to 0.0.108

22 months ago[TS] Update auto-generated typescript bindings
Matt Corallo [Tue, 28 Jun 2022 21:51:14 +0000 (21:51 +0000)]
[TS] Update auto-generated typescript bindings

22 months ago[TS] Update tests to new upstream API changes in 0.0.108
Matt Corallo [Tue, 28 Jun 2022 21:56:53 +0000 (21:56 +0000)]
[TS] Update tests to new upstream API changes in 0.0.108

22 months ago[TS] Link wasm32-wasi libc as rustc no longer does by default
Matt Corallo [Tue, 28 Jun 2022 21:55:27 +0000 (21:55 +0000)]
[TS] Link wasm32-wasi libc as rustc no longer does by default

22 months ago[Java] Update auto-generated Java bindings for 0.0.108
Matt Corallo [Mon, 27 Jun 2022 19:34:24 +0000 (19:34 +0000)]
[Java] Update auto-generated Java bindings for 0.0.108

22 months ago[Java] Handle different ldk lib paths in the ar in genbindings.sh
Matt Corallo [Mon, 27 Jun 2022 20:09:23 +0000 (20:09 +0000)]
[Java] Handle different ldk lib paths in the ar in genbindings.sh

22 months ago[Java] Use public channels and test Access interface in tests
Matt Corallo [Wed, 29 Jun 2022 18:46:05 +0000 (18:46 +0000)]
[Java] Use public channels and test Access interface in tests

22 months ago[Java] Update batteries and tests to 0.0.108
Matt Corallo [Mon, 27 Jun 2022 19:36:44 +0000 (19:36 +0000)]
[Java] Update batteries and tests to 0.0.108

This is mostly pretty obvious changes to keep up with the latest
API, though it also includes a change to make `PeerTest` work
correctly in a world where `PeerManager` supports multithreaded
parallel access.

22 months ago[Java] Do not put a org.ldk.structs prefix for usize types
Matt Corallo [Mon, 27 Jun 2022 19:32:01 +0000 (19:32 +0000)]
[Java] Do not put a org.ldk.structs prefix for usize types

22 months ago[Java] Map `LDKReadOnly*` the same as `LDKLocked*` ie via `AutoClosable`
Matt Corallo [Wed, 29 Jun 2022 15:41:06 +0000 (15:41 +0000)]
[Java] Map `LDKReadOnly*` the same as `LDKLocked*` ie via `AutoClosable`

22 months agoPass unnamed enum field comments through to field processing
Matt Corallo [Tue, 28 Jun 2022 17:21:37 +0000 (17:21 +0000)]
Pass unnamed enum field comments through to field processing

22 months agoAdd handling for the new WitnessVersion type, similar to u5 but 4-bits
Matt Corallo [Mon, 27 Jun 2022 18:28:59 +0000 (18:28 +0000)]
Add handling for the new WitnessVersion type, similar to u5 but 4-bits

22 months agoUse fully-qualified types more often in conversions
Matt Corallo [Mon, 27 Jun 2022 18:20:45 +0000 (18:20 +0000)]
Use fully-qualified types more often in conversions

This ensures to-human conversions still work correctly inside
enums where there is an enum variant named identically to the type
which is being converted to (eg in the new `GraphSyncError` enum).

23 months agoMerge pull request #100 from TheBlueMatt/main
Matt Corallo [Thu, 26 May 2022 22:42:22 +0000 (15:42 -0700)]
Merge pull request #100 from TheBlueMatt/main

Add note about garbage collection of the chan man constructor

23 months agoAdd note about garbage collection of the chan man constructor
Matt Corallo [Thu, 26 May 2022 21:42:56 +0000 (21:42 +0000)]
Add note about garbage collection of the chan man constructor

23 months agoMerge pull request #98 from tnull/2022-05-fix-genbindings-aarch64
Matt Corallo [Fri, 20 May 2022 18:26:24 +0000 (18:26 +0000)]
Merge pull request #98 from tnull/2022-05-fix-genbindings-aarch64

Some fixes for aarch64 macos

23 months agoSome fixes for aarch64 macos
Elias Rohrer [Fri, 20 May 2022 13:45:12 +0000 (15:45 +0200)]
Some fixes for aarch64 macos

23 months agoMerge pull request #97 from TheBlueMatt/main
Matt Corallo [Fri, 13 May 2022 15:38:26 +0000 (15:38 +0000)]
Merge pull request #97 from TheBlueMatt/main

[Java] Fix PATH order to use upstream clang in OSX CI

23 months ago[Java] Fix PATH order to use upstream clang in OSX CI
Matt Corallo [Thu, 12 May 2022 20:08:29 +0000 (20:08 +0000)]
[Java] Fix PATH order to use upstream clang in OSX CI

Thanks to @tnull for spotting this one.

23 months agoMerge pull request #96 from TheBlueMatt/main
Matt Corallo [Thu, 12 May 2022 20:10:51 +0000 (20:10 +0000)]
Merge pull request #96 from TheBlueMatt/main

[Java] Correct trivial race condition in HumanObjectPeerTest

2 years agoUpdate ts bindings version to 0.0.106.0beta1
Matt Corallo [Fri, 15 Apr 2022 20:22:55 +0000 (20:22 +0000)]
Update ts bindings version to 0.0.106.0beta1

2 years ago[Java] Correct trivial race condition in HumanObjectPeerTest
Matt Corallo [Fri, 15 Apr 2022 18:50:15 +0000 (18:50 +0000)]
[Java] Correct trivial race condition in HumanObjectPeerTest

On my (very slow) old armv7 device, HumanObjectPeerTest can fail as
`maybe_exchange_peer_messages` will set `ran = false` *after* a
message is added to the runqueue, but before it runs, then when we
call `process_events` there will be no events to process, then
before we get into the `runqueue` `synchronized` block the message
will be delivered, causing us to think we're done, even though
there are now events pending. Because going around the loop twice
is free, we should just not set `ran` to false at the top of
`maybe_exchange_peer_messages`.

2 years agoMerge pull request #95 from TheBlueMatt/main v0.0.106.0
Matt Corallo [Fri, 15 Apr 2022 17:21:43 +0000 (17:21 +0000)]
Merge pull request #95 from TheBlueMatt/main

Convert primitives before passing to host language

2 years agoUpdate OSX CI clang to 14.0.1
Matt Corallo [Fri, 15 Apr 2022 16:30:06 +0000 (16:30 +0000)]
Update OSX CI clang to 14.0.1

2 years ago[TS] Update auto-generated bindings
Matt Corallo [Fri, 15 Apr 2022 16:17:28 +0000 (16:17 +0000)]
[TS] Update auto-generated bindings

2 years ago[Java] Update auto-generated bindings
Matt Corallo [Fri, 15 Apr 2022 16:14:52 +0000 (16:14 +0000)]
[Java] Update auto-generated bindings

2 years agoConvert primitives before passing to host language
Matt Corallo [Fri, 15 Apr 2022 16:11:46 +0000 (16:11 +0000)]
Convert primitives before passing to host language

This resolves an issue where we map unsigned primitives to their
signed variants, and occasionally pass the unsigned variant (which
is outside the bounds of the signed variant) to the host language.

In Java this can cause a panic as the VM sees an int outside the
range of a short (for example with network ports).