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

luau 0.658 #205453

Merged
merged 2 commits into from
Jan 24, 2025
Merged

luau 0.658 #205453

merged 2 commits into from
Jan 24, 2025

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
## What's Changed

General

  • Allow types of tables to diverge after using table.clone (fixes #1617).
  • Allow 2-argument vector.create in Luau.
  • Fix a crash when suggesting autocomplete after encountering parsing errors.
  • Add lua_tolstringatom C API which returns the string length (whether or not the atom exists) and which extends the existing lua_tostringatom function the same way lua_tolstring/lua_tostring do.
  • Luau now retains the DFGs of typechecked modules.
  • Fix math.map/math.lerp merge fallout by @zeux in Fix math.map/math.lerp merge fallout luau-lang/luau#1621
  • Fixup desync between internal and external codebases by @vegorov-rbx in Fixup desync between internal and external codebases luau-lang/luau#1622

Magic Functions Migration Note

We've made a change to the API used to define magic functions.

Previously, we had a set of function pointers on each FunctionType that would be invoked by the type inference engine at the correct point.

The problem we'd run into is that they were all std::functions, we'd grown quite a few of them, and Luau allocates tens of thousands of types as it performs type inference. This adds up to a large amount of memory for data that isn't used by 99% of types.

To slim things down a bit, we've replaced all of those std::functions with a single shared_ptr to a new interface called MagicFunction. This slims down the memory footprint of each type by about 50 bytes.

The virtual methods of MagicFunction have roughly 1:1 correspondence with the old interface, so updating things should not be too difficult:

  • FunctionType::magicFunction is now MagicFunction::handleOldSolver
  • FunctionType::dcrMagicFunction is now MagicFunction::infer
  • FunctionType::dcrMagicRefinement is now MagicFunction::refine
  • FunctionType::dcrMagicTypeCheck is now MagicFunction::typeCheck

Full Changelog: luau-lang/luau@0.657...0.658


Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Ariel Weiss [email protected]
Co-authored-by: Aviral Goel [email protected]
Co-authored-by: Hunter Goldstein [email protected]
Co-authored-by: Talha Pathan [email protected]
Co-authored-by: Varun Saini [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]

@github-actions github-actions bot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Jan 24, 2025
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 Jan 24, 2025
@BrewTestBot BrewTestBot enabled auto-merge January 24, 2025 23:21
@BrewTestBot BrewTestBot added this pull request to the merge queue Jan 24, 2025
Merged via the queue into master with commit 4c5a687 Jan 24, 2025
15 checks passed
@BrewTestBot BrewTestBot deleted the bump-luau-0.658 branch January 24, 2025 23:29
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants