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

lune 0.7.7 #140327

Merged
merged 2 commits into from
Aug 24, 2023
Merged

lune 0.7.7 #140327

merged 2 commits into from
Aug 24, 2023

Conversation

chenrui333
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
### Added
  • Added a REPL to Lune. (#83)

    This allows you to run scripts within Lune without writing files!

    Example usage, inside your favorite terminal:

    # 1. Run the Lune executable, without any arguments
    lune
    
    # 2. You will be shown the current Lune version and a blank prompt arrow:
    Lune v0.7.7
    >
    
    # 3. Start typing, and hit enter when you want to run your script!
    #    Your script will run until completion and output things along the way.
    > print(2 + 3)
    5
    > print("Hello, lune changelog!")
    Hello, lune changelog!
    
    # 4. You can also set variables that will get preserved between runs.
    #    Note that local variables do not get preserved here.
    > myVariable = 123
    > print(myVariable)
    123
    
    # 5. Press either of these key combinations to exit the REPL:
    #    - Ctrl + D
    #    - Ctrl + C
  • Added a new luau built-in library for manually compiling and loading Luau source code. (#82)

    Example usage:

    local luau = require("@lune/luau")
    
    local bytecode = luau.compile("print('Hello, World!')")
    local callableFn = luau.load(bytecode)
    
    callableFn()
    
    -- Additionally, we can skip the bytecode generation and
    -- load a callable function directly from the code itself.
    local callableFn2 = luau.load("print('Hello, World!')")
    
    callableFn2()

Changed

  • Update to Luau version 0.591

  • Lune's internal task scheduler and require functionality has been completely rewritten.

    The new scheduler is much more stable, conforms to a larger test suite, and has a few additional benefits:

    • Built-in libraries are now lazily loaded, meaning nothing gets allocated until the built-in library gets loaded using require("@lune/builtin-name"). This also improves startup times slightly.
    • Spawned processes using process.spawn now run on different thread(s), freeing up resources for the main thread where luau runs.
    • Serving requests using net.serve now processes requests on background threads, also freeing up resources. In the future, this will also allow us to offload heavy tasks such as compression/decompression to background threads.
    • Groundwork for custom / user-defined require aliases has been implemented, as well as absolute / cwd-relative requires. These will both be exposed as options and be made available to use some time in the future.
  • When using the serde built-in library, keys are now sorted during serialization. This means that the output of encode is now completely deterministic, and wont cause issues when committing generated files to git etc.

Fixed

  • Fixed not being able to pass arguments to the thread using coroutine.resume. (#86)

  • Fixed a large number of long-standing issues, from the task scheduler rewrite:

    • Fixed require hanging indefinitely when the module being require-d uses an async function in its main body.
    • Fixed background tasks (such as net.serve) not keeping Lune alive even if there are no lua threads to run.
    • Fixed spurious panics and error messages such as Tried to resume next queued future but none are queued.
    • Fixed not being able to catch non-string errors properly, errors were accidentally being wrapped in an opaque userdata type.

@github-actions github-actions bot added rust Rust use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Aug 24, 2023
@github-actions
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Aug 24, 2023
@BrewTestBot BrewTestBot enabled auto-merge August 24, 2023 01:25
@BrewTestBot BrewTestBot added this pull request to the merge queue Aug 24, 2023
Merged via the queue into Homebrew:master with commit f0704fb Aug 24, 2023
@chenrui333 chenrui333 deleted the bump-lune-0.7.7 branch January 22, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants