Skip to content

Upstream 5.5.0#7

Open
michaeam wants to merge 22 commits into
pallene-lang:upstreamfrom
michaeam:upstream
Open

Upstream 5.5.0#7
michaeam wants to merge 22 commits into
pallene-lang:upstreamfrom
michaeam:upstream

Conversation

@michaeam
Copy link
Copy Markdown

  • From instructions in UPDATING.md
  • Minor fixes
  • Upstream merge to main and tagging (5.5.0) left to owner

hugomg added 18 commits May 14, 2022 19:41
Allow these functions to be used by extension modules
This way you can see if you are running a patched Lua
Merge all the internal headers. This makes life easier for our users
because they will only need to include a single header. Furthermore,
this avoids cluttering the /usr/include with lots of internal Lua
headers.
Since the core API can change after even a minor patch, we need a checkversion
function that looks at the LUA_VERSION_RELEASE_NUM. To avoid breaking
backwards compatibility, we introduce a new function instead of modifying
luaL_checkversion.
Also, add gen-lua-core.h to the makefile prerequesites of luacore.h,
to the latter is re-built whenever we change the former.
@hugomg
Copy link
Copy Markdown
Member

hugomg commented Apr 19, 2026

Hi Michael, thanks for contributing this.

I noticed that the commit message refers tk "minor fixes". Could you please clarify what those mean?

@michaeam
Copy link
Copy Markdown
Author

Hello Hugo. I've updated the PR, corrected another error, build & run-tested with pallene 5.5.0 (patch for pallene is WIP, some guessing needs to be better validated before PR) and hopefully a somewhat better commit header. with requested clarifications.

Here is a pallene trivial sanity test:

$ pallenec examples/arithmetic/arithmetic.pln
$ lua examples/arithmetic/main.lua 
1 + 2 = 3
1.5 - 3.25 = -1.75
$ 
$ lua -v
Lua 5.5.0  Copyright (C) 1994-2025 Lua.org, PUC-Rio

By this small contribution hoping to encourage your work and pallenes. Both which I think shows huge promise & potential.

Thanks!

@michaeam
Copy link
Copy Markdown
Author

Updated commit-header can be seen here: c27a0ca

@hugomg
Copy link
Copy Markdown
Member

hugomg commented Apr 28, 2026

Thanks, Michael. I'm back from the holidays now and I'm excited to see someone offering to contribute the update to 5.5.0!

Do you think it would be too difficult to refactor this PR so there is one commit that just brings merges in the upstream Lua stuff and a separate commit that contains only your customizations? That would make it easier to review the changes and would also help in the long term because sometimes we have to go back and look back at old commits to figure out exactly how Pallene differs from upstream Lua

@michaeam
Copy link
Copy Markdown
Author

michaeam commented May 4, 2026

"Do you think it would be too difficult to refactor..." Not at all. That's how I had it from start and I still have that as local branch somewhere. I squashed as that's how it looked you had dine it history before.

I had somewhat limited time to do this and did this one and the Pallene contribution (PR:s) you saw on my free time to learn more about possible Language version 5.5 breakages. (As I could not find any in neither my own projects nor at my employers Axis, where I'm package-manager for Poky/bitbake where it's both used integrated into processes firmware, and used as a system language. Happy to have found a few, **but only a few (and which are easy to fix where they could exist). I.e. standing better prepared if/when questions from various teams arrive ).

michaeam added 3 commits May 4, 2026 19:43
Replace all current source-files with new ones from official PUC
Rio Lua 5.5.0

* rm src/*.[ch]
* rm src/Makefile
* tar -xvf lua-5.5.0.tar.gz
* cp lua-5.5.0/src/*.[ch] src/
* cp lua-5.5.0/src/Makefile src/
* git add src/*
* Build with all API's link-visible
* Produce the common h-file luacore.h needed for Lua-VM
  builds (Pallene)
* Make-target CORE_HEADERS from previous lua-internals version, but with
  needed changes of input orders and content
* rm doc/*
* cp lua-5.5.0/doc/* doc/
* git add doc/*
@michaeam
Copy link
Copy Markdown
Author

michaeam commented May 4, 2026

Remade from upgrade memory with detailed steps in each commit header. For some reason it didn't turn out exactly as before. Previous painstakingly merged src/*.[ch] with old version of lua-internals.

This one turned out cleaner and better I hope.

Follow the instructions in the commits in a parallel work-directory. End result should have no differences.

Please also make thorough clean build-tests before considering as I might have residuals left on my build-host, (llimits.h no longer needed change in lua-internals. I.e. cleaner upgrade => better)

@michaeam
Copy link
Copy Markdown
Author

michaeam commented May 4, 2026

Final touches added to PR, rebuild pallene from installed lua-internals with same sanity check: OK

$ pallenec examples/arithmetic/arithmetic.pln
$ lua examples/arithmetic/main.lua 
1 + 2 = 3
1.5 - 3.25 = -1.75
$ 
$ lua -v
Lua 5.5.0  Copyright (C) 1994-2025 Lua.org, PUC-Rio

PR should now be ready to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants