Skip to content

Updating project to use luarocks#34

Draft
travishathaway wants to merge 1 commit into
osm2pgsql-dev:masterfrom
travishathaway:luarocks
Draft

Updating project to use luarocks#34
travishathaway wants to merge 1 commit into
osm2pgsql-dev:masterfrom
travishathaway:luarocks

Conversation

@travishathaway
Copy link
Copy Markdown

Please see my original comment here for a little more context:

Description

To make this easier to package and distribute, I'm proposing that we update this repository to use a luarocks spec file. This pull request still needs some refine, and I am more than happy to do that. I just want to know whether this would even be considered at all.

Notable changes:

  • Adds a new osm2pgsql-themepark-scm-1.rockspec
  • Adds a new THEMEPARK_PATH environment variable for finding user defined themes.
  • Reorganizes the folder structure to move themes/ into the the lua/ folder so these default themes can appear in the package.

I've left my implementation notes in the .openspec/ folder intact so you can have even more context around how everything works. We can of course remove this if we decide to merge this.

Like I said in the comment above, I have a complete working example of all this in my CLI tool osmprj, so I'm feeling quite confident that this could be a worthwhile change.

More than happy to discuss further, and thank you so much for taking the time to read and consider this change 🙏.

@joto
Copy link
Copy Markdown
Contributor

joto commented Jun 2, 2026

This is quite a big change and I haven't digested it all yet. Lets try to split this up into steps.

  1. Can you please remove all the docs from the PR and add them to this PR as comments? They are easier to read that way, because Github renders the Markdown and they are not mixed up with what actually changes. If this is merged, we'll need to put some of it on https://osm2pgsql.org/themepark/ , but we can deal with that later.
  2. If I understand you correctly we'd end up with one luarocks package for Themepark itself plus extra packages for themes. They are a bit unusual as luarocks packages, because they will not work with a normal Lua binary, they need osm2pgsql. Is there some precedence for that in the Lua community? Is it okay to have Luarocks packages that need more than a normal Lua?
  3. I see a lof of changes are just wrapping the Lua files in return function(themepark, theme, cfg)...end. Can you say something about why that's needed/useful?

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