Skip to content

Commit

Permalink
Merge branch 'master' into fix/debugger-lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanfh committed Jan 15, 2025
2 parents e87c61c + 2b5ddd6 commit 7ac2670
Show file tree
Hide file tree
Showing 357 changed files with 22,442 additions and 14,145 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: onyx-lang
30 changes: 15 additions & 15 deletions .github/workflows/onyx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
setup:
name: Set up
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
outputs:
VERSION: ${{ steps.setup.outputs.VERSION }}
DOING_RELEASE: ${{ steps.setup.outputs.DOING_RELEASE }}
Expand All @@ -41,53 +41,53 @@ jobs:
matrix:
include:
- build: linux-amd64
os: ubuntu-20.04
os: ubuntu-24.04
runtime_library: ovmwasm
artifact_name: 'onyx-linux-ovm-amd64'
- build: linux-amd64
os: ubuntu-20.04
os: ubuntu-24.04
runtime_library: wasmer
artifact_name: 'onyx-linux-wasmer-amd64'
- build: linux-amd64
os: ubuntu-20.04
os: ubuntu-24.04
runtime_library: none
artifact_name: 'onyx-linux-none-amd64'
- build: linux-arm64
os: ubuntu-20.04
os: ubuntu-24.04
runtime_library: ovmwasm
artifact_name: 'onyx-linux-ovm-arm64'
- build: linux-arm64
os: ubuntu-20.04
os: ubuntu-24.04
runtime_library: wasmer
artifact_name: 'onyx-linux-wasmer-arm64'
- build: linux-arm64
os: ubuntu-20.04
os: ubuntu-24.04
runtime_library: none
artifact_name: 'onyx-linux-none-arm64'
- build: darwin-arm64
os: macos-12
os: macos-13
runtime_library: none
target: aarch64-apple-darwin
artifact_name: 'onyx-darwin-none-arm64'
- build: darwin-arm64
os: macos-12
os: macos-13
runtime_library: wasmer
target: aarch64-apple-darwin
artifact_name: 'onyx-darwin-wasmer-arm64'
- build: darwin-amd64
os: macos-12
os: macos-13
runtime_library: none
artifact_name: 'onyx-darwin-none-amd64'
- build: darwin-amd64
os: macos-12
os: macos-13
runtime_library: wasmer
artifact_name: 'onyx-darwin-wasmer-amd64'
- build: darwin-amd64
os: macos-12
os: macos-13
runtime_library: ovmwasm
artifact_name: 'onyx-darwin-ovm-amd64'
- build: darwin-arm64
os: macos-12
os: macos-13
runtime_library: ovmwasm
target: aarch64-apple-darwin
artifact_name: 'onyx-darwin-ovm-arm64'
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
cmd.exe /c 'build.bat dist'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist
Expand All @@ -245,7 +245,7 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ bin/onyx-run
bin/onyx
releases/
compiler/onyx
compiler/libonyx.so
compiler/libonyx.dylib
compiler/libonyx.dll
runtime/onyx_runtime.so
runtime/onyx_runtime.dylib
runtime/onyx_runtime.dll
Expand Down
160 changes: 156 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,19 +1,171 @@
Nightly Release
Release 0.1.13
--------------
8th November 2024

Additions:
- Unwrap operator, `x!`.
- Similar to try operator (`x?`), but panics if value is not present.
- "Field update" syntax. A shorthand to change a field of a structure.
- `.{ ..old_value, field = new_value }`
- `onyx watch` now works on MacOS.
- `onyx run-watch` to automatically re-run the program on changes.
- `#wasm_section` directive to add custom sections to the WASM binary.
- Custom commands per project
- Installed in a `.onyx` directory
- `onyx pkg build` can now run shell commands and multi-stage builds.
- `Stalled` compiler hook to allow for code injection when the compiler stalls.
- `Slice.map`
- `Slice.map_inplace`
- `Slice.fold1`
- `Slice.get_opt`
- `Iterator.from`
- `iter.group_by`
- `core.alloc.debug`
- `core.os.args`
- `core.crypto.hmac`
- `core.crypto.keys`
- `core.encoding.json.Value.as_entry_array`
- `core.encoding.base64 { encode_url, decode_url }`
- `core.encoding.xml`

Removals:

Changes:
- Capture/closure syntax is now `(params) use (captures) ...`.
- `(x: i32) use (variable) -> str { ... }`
- `(x) use (variable) => { ... }`
- `&&` and `||` now short-circuit.
- Fixed-sized arrays (`[N] T`) are now passed by value.
- The size of tag field for unions is now dependent on the number of variants.
- Parsing structs no longer sometimes needs `#type`.
- Renamed `core.alloc.memdebug` to `core.alloc.memwatch`.

Bugfixes:
- Bug when injecting into a `#distinct` type.
- Many, many random bugs.



Release 0.1.12
--------------
19th May 2024

Additions:
- Ability to pipe into a method call.
- `x |> y->z() === y->z(x)`
- Ability to pipe into a try operator.
- `x |> y()?` === y(x)?`
- Ability to use `_` where `#auto` is used.
- This will be come the default soon and `#auto` will be removed.
- `return #from_proc` to return all the way from the procedure.
- Variant of `new` that accepts an r-value and places it in the heap.
- Builtin `panic` procedure that is equivalent to `assert(false, ...)`
- Format parameter "a" that unpacks an `any` and formats its internal value.
- `--generate-name-section` CLI flag

Removals:
- `Optional.try` as it is incompatible with new semantics of `?`.

Changes:
- `str.as_str` is now preferred over `string.as_str`
- `str.compare` is now preferred over `string.compare`
- `str.to_cstr_on_stack` is now preferred over `string.to_cstr_on_stack`
- `str.join` is now preferred over `string.join`
- Implementation of `?` for `Optional` and `Result` to return from the enclosing procedure.
- JavaScript file generated by `-r js` is no longer an ES6 module.

Bugfixes:
- Fixed WASI compilation due to syntax issue.
- Fixed WASI platform `__file_open` implementation for wasmtime.
- Weird edge case when using multiple placeholder arguments in a quick procedure.

Contributors:


Release 0.1.11
--------------
21st April 2024

Additions:
- Ability specify where piped arguments are placed using `_`.
- `x |> foo(y, _) == foo(y, x)`
- Alternative syntax for `case #default ...`. You can now just write `case _ ...`.
- Alternative syntax for binding documentation using `///`.
- **Experimental** compiler extensions feature, currently used to create procedural macros.
- `core.misc.any_deep_copy`
- Ability to explicitly specify tag value for tagged unions.
- `Variant as value: type`, i.e. `Foo as 3: i32`

Removals:
- Deprecated the use of `#default` in case statements. Use `_` instead.
- Removed `iter.take_one`. Use `iter.next` instead.

Changes:
There are several *breaking* changes in this release related to core library APIs.
- `Iterator.next` now returns `? T` instead of `(T, bool)`
- `io.Stream` uses `Result(T, Error)` for return types instead of `(Error, T)`
- `switch` over a `range` is no longer inclusive by default, since `..=` exists now.
- Enabled optional semicolons by default.
- `//+optional-semicolons` is no longer necessary.

There are also several non-breaking changes.
- The internal memory layout is different. See pull request #133 for details.

Bugfixes:

Contributors:



Release 0.1.10
---------------
No release date yet
30th March 2024

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

Removals:

Changes:
- Revamped CLI
- Shorthand commands (r for run, b for build, etc.)
- Improved appearance
- Better help pages
- Note: flags must now appear before all files
- Better error messages for common issues
- `Array` should be preferred over `core.array`
- `Slice` should be preferred over `core.slice`
- `str` should be preferred over `core.string`

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


Contributors:
- @Syuparn (1 pull request)



Expand Down
Loading

0 comments on commit 7ac2670

Please sign in to comment.