Skip to content

Commit 7ac2670

Browse files
committed
Merge branch 'master' into fix/debugger-lifecycle
2 parents e87c61c + 2b5ddd6 commit 7ac2670

File tree

357 files changed

+22442
-14145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+22442
-14145
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: onyx-lang

.github/workflows/onyx-build.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
setup:
1818
name: Set up
19-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-24.04
2020
outputs:
2121
VERSION: ${{ steps.setup.outputs.VERSION }}
2222
DOING_RELEASE: ${{ steps.setup.outputs.DOING_RELEASE }}
@@ -41,53 +41,53 @@ jobs:
4141
matrix:
4242
include:
4343
- build: linux-amd64
44-
os: ubuntu-20.04
44+
os: ubuntu-24.04
4545
runtime_library: ovmwasm
4646
artifact_name: 'onyx-linux-ovm-amd64'
4747
- build: linux-amd64
48-
os: ubuntu-20.04
48+
os: ubuntu-24.04
4949
runtime_library: wasmer
5050
artifact_name: 'onyx-linux-wasmer-amd64'
5151
- build: linux-amd64
52-
os: ubuntu-20.04
52+
os: ubuntu-24.04
5353
runtime_library: none
5454
artifact_name: 'onyx-linux-none-amd64'
5555
- build: linux-arm64
56-
os: ubuntu-20.04
56+
os: ubuntu-24.04
5757
runtime_library: ovmwasm
5858
artifact_name: 'onyx-linux-ovm-arm64'
5959
- build: linux-arm64
60-
os: ubuntu-20.04
60+
os: ubuntu-24.04
6161
runtime_library: wasmer
6262
artifact_name: 'onyx-linux-wasmer-arm64'
6363
- build: linux-arm64
64-
os: ubuntu-20.04
64+
os: ubuntu-24.04
6565
runtime_library: none
6666
artifact_name: 'onyx-linux-none-arm64'
6767
- build: darwin-arm64
68-
os: macos-12
68+
os: macos-13
6969
runtime_library: none
7070
target: aarch64-apple-darwin
7171
artifact_name: 'onyx-darwin-none-arm64'
7272
- build: darwin-arm64
73-
os: macos-12
73+
os: macos-13
7474
runtime_library: wasmer
7575
target: aarch64-apple-darwin
7676
artifact_name: 'onyx-darwin-wasmer-arm64'
7777
- build: darwin-amd64
78-
os: macos-12
78+
os: macos-13
7979
runtime_library: none
8080
artifact_name: 'onyx-darwin-none-amd64'
8181
- build: darwin-amd64
82-
os: macos-12
82+
os: macos-13
8383
runtime_library: wasmer
8484
artifact_name: 'onyx-darwin-wasmer-amd64'
8585
- build: darwin-amd64
86-
os: macos-12
86+
os: macos-13
8787
runtime_library: ovmwasm
8888
artifact_name: 'onyx-darwin-ovm-amd64'
8989
- build: darwin-arm64
90-
os: macos-12
90+
os: macos-13
9191
runtime_library: ovmwasm
9292
target: aarch64-apple-darwin
9393
artifact_name: 'onyx-darwin-ovm-arm64'
@@ -223,7 +223,7 @@ jobs:
223223
cmd.exe /c 'build.bat dist'
224224
225225
- name: Upload Artifacts
226-
uses: actions/upload-artifact@v3
226+
uses: actions/upload-artifact@v4
227227
with:
228228
name: ${{ matrix.artifact_name }}
229229
path: dist
@@ -245,7 +245,7 @@ jobs:
245245
upload_url: ${{ steps.create_release.outputs.upload_url }}
246246
steps:
247247
- name: Download artifacts
248-
uses: actions/download-artifact@v2
248+
uses: actions/download-artifact@v4
249249
with:
250250
path: artifacts
251251
- name: Create Release

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ bin/onyx-run
2424
bin/onyx
2525
releases/
2626
compiler/onyx
27+
compiler/libonyx.so
28+
compiler/libonyx.dylib
29+
compiler/libonyx.dll
2730
runtime/onyx_runtime.so
2831
runtime/onyx_runtime.dylib
2932
runtime/onyx_runtime.dll

CHANGELOG

Lines changed: 156 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,171 @@
1-
Nightly Release
1+
Release 0.1.13
2+
--------------
3+
8th November 2024
4+
5+
Additions:
6+
- Unwrap operator, `x!`.
7+
- Similar to try operator (`x?`), but panics if value is not present.
8+
- "Field update" syntax. A shorthand to change a field of a structure.
9+
- `.{ ..old_value, field = new_value }`
10+
- `onyx watch` now works on MacOS.
11+
- `onyx run-watch` to automatically re-run the program on changes.
12+
- `#wasm_section` directive to add custom sections to the WASM binary.
13+
- Custom commands per project
14+
- Installed in a `.onyx` directory
15+
- `onyx pkg build` can now run shell commands and multi-stage builds.
16+
- `Stalled` compiler hook to allow for code injection when the compiler stalls.
17+
- `Slice.map`
18+
- `Slice.map_inplace`
19+
- `Slice.fold1`
20+
- `Slice.get_opt`
21+
- `Iterator.from`
22+
- `iter.group_by`
23+
- `core.alloc.debug`
24+
- `core.os.args`
25+
- `core.crypto.hmac`
26+
- `core.crypto.keys`
27+
- `core.encoding.json.Value.as_entry_array`
28+
- `core.encoding.base64 { encode_url, decode_url }`
29+
- `core.encoding.xml`
30+
31+
Removals:
32+
33+
Changes:
34+
- Capture/closure syntax is now `(params) use (captures) ...`.
35+
- `(x: i32) use (variable) -> str { ... }`
36+
- `(x) use (variable) => { ... }`
37+
- `&&` and `||` now short-circuit.
38+
- Fixed-sized arrays (`[N] T`) are now passed by value.
39+
- The size of tag field for unions is now dependent on the number of variants.
40+
- Parsing structs no longer sometimes needs `#type`.
41+
- Renamed `core.alloc.memdebug` to `core.alloc.memwatch`.
42+
43+
Bugfixes:
44+
- Bug when injecting into a `#distinct` type.
45+
- Many, many random bugs.
46+
47+
48+
49+
Release 0.1.12
50+
--------------
51+
19th May 2024
52+
53+
Additions:
54+
- Ability to pipe into a method call.
55+
- `x |> y->z() === y->z(x)`
56+
- Ability to pipe into a try operator.
57+
- `x |> y()?` === y(x)?`
58+
- Ability to use `_` where `#auto` is used.
59+
- This will be come the default soon and `#auto` will be removed.
60+
- `return #from_proc` to return all the way from the procedure.
61+
- Variant of `new` that accepts an r-value and places it in the heap.
62+
- Builtin `panic` procedure that is equivalent to `assert(false, ...)`
63+
- Format parameter "a" that unpacks an `any` and formats its internal value.
64+
- `--generate-name-section` CLI flag
65+
66+
Removals:
67+
- `Optional.try` as it is incompatible with new semantics of `?`.
68+
69+
Changes:
70+
- `str.as_str` is now preferred over `string.as_str`
71+
- `str.compare` is now preferred over `string.compare`
72+
- `str.to_cstr_on_stack` is now preferred over `string.to_cstr_on_stack`
73+
- `str.join` is now preferred over `string.join`
74+
- Implementation of `?` for `Optional` and `Result` to return from the enclosing procedure.
75+
- JavaScript file generated by `-r js` is no longer an ES6 module.
76+
77+
Bugfixes:
78+
- Fixed WASI compilation due to syntax issue.
79+
- Fixed WASI platform `__file_open` implementation for wasmtime.
80+
- Weird edge case when using multiple placeholder arguments in a quick procedure.
81+
82+
Contributors:
83+
84+
85+
Release 0.1.11
86+
--------------
87+
21st April 2024
88+
89+
Additions:
90+
- Ability specify where piped arguments are placed using `_`.
91+
- `x |> foo(y, _) == foo(y, x)`
92+
- Alternative syntax for `case #default ...`. You can now just write `case _ ...`.
93+
- Alternative syntax for binding documentation using `///`.
94+
- **Experimental** compiler extensions feature, currently used to create procedural macros.
95+
- `core.misc.any_deep_copy`
96+
- Ability to explicitly specify tag value for tagged unions.
97+
- `Variant as value: type`, i.e. `Foo as 3: i32`
98+
99+
Removals:
100+
- Deprecated the use of `#default` in case statements. Use `_` instead.
101+
- Removed `iter.take_one`. Use `iter.next` instead.
102+
103+
Changes:
104+
There are several *breaking* changes in this release related to core library APIs.
105+
- `Iterator.next` now returns `? T` instead of `(T, bool)`
106+
- `io.Stream` uses `Result(T, Error)` for return types instead of `(Error, T)`
107+
- `switch` over a `range` is no longer inclusive by default, since `..=` exists now.
108+
- Enabled optional semicolons by default.
109+
- `//+optional-semicolons` is no longer necessary.
110+
111+
There are also several non-breaking changes.
112+
- The internal memory layout is different. See pull request #133 for details.
113+
114+
Bugfixes:
115+
116+
Contributors:
117+
118+
119+
120+
Release 0.1.10
2121
---------------
3-
No release date yet
122+
30th March 2024
4123

5124
Additions:
6-
- Added new alternate error format that may become the default in the future.
125+
- JavaScript interop
126+
- `core.js` package for JS FFI.
127+
- `#js` directive to build a JavaScript file during compilation.
128+
- Implicit injections
129+
- `#inject` is no longer required in some cases
130+
- Named return values
131+
- Official builds for Linux AARCH64
132+
- `Slice` and `Array` structures for placing methods on slices and dynamic arrays.
133+
- Range type improvements
134+
- `range64` type
135+
- `..=` operator that is a range, with an inclusive upper end.
136+
- New alternate error format that may become the default in the future.
7137
- Use `--error-format v2` or set environment variable `ONYX_ERROR_FORMAT` to be `v2`.
138+
- Auto-disposing locals (experimental)
139+
- `use x := ...`
140+
- Core library functions
141+
- New process spawning API with builder pattern (`os.command`)
142+
- `sync.MutexGuard`
143+
- `sync.Channel`
144+
- `hash.sha1`
145+
- `net.dial`
146+
- `net.resolve`
147+
- integer constants `i8.MIN`, `i64.MAX`, etc.
8148

9149
Removals:
10150

11151
Changes:
152+
- Revamped CLI
153+
- Shorthand commands (r for run, b for build, etc.)
154+
- Improved appearance
155+
- Better help pages
156+
- Note: flags must now appear before all files
157+
- Better error messages for common issues
158+
- `Array` should be preferred over `core.array`
159+
- `Slice` should be preferred over `core.slice`
160+
- `str` should be preferred over `core.string`
12161

13162
Bugfixes:
14163
- Fixed compiler crash when trying to iterate over something that is not iterable.
164+
- Fixed wrong implementation of futexes on MacOS.
165+
- Fixed implementation of `platform.__time()`
15166

16-
167+
Contributors:
168+
- @Syuparn (1 pull request)
17169

18170

19171

0 commit comments

Comments
 (0)