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

Support string requires in linker codegen #170

Open
grilme99 opened this issue Jul 31, 2023 · 1 comment
Open

Support string requires in linker codegen #170

grilme99 opened this issue Jul 31, 2023 · 1 comment

Comments

@grilme99
Copy link

I'm currently working on getting Roblox's Jest port working in Lua via Lune. One barrier to use currently is that Lune has no usable package manager because Wally does not support codegen with string requires. Resolving this would allow Lune scripts to have dependencies managed by Wally.

This feature would also benefit game projects that adopt string requires and use Darklua to transform them as a build step.

Open questions:

  • How should this be configured? Should it be:
    • Per-project (e.g. CoolGame says linker_mode: string, and all of its dependencies are linked using string requires)
    • or Per-package (e.g. Jest says linker_mode: string and only Jest is linked using strings in any project. This option allows for a project to mix and match linker modes.
  • What if (for example) a game project that makes use of regular Wally packages also wants to make use of packages for Lune scripts? How can packages be mixed and matched most effectively? What if the game and Lune scripts both share a dependency but can't both use the same linker mode?
@magnalite
Copy link
Member

magnalite commented Aug 7, 2023

Definitely something we should support! Unfortunately I think it may take some time for us to get there on the main branch. For now I think Lune specific changes like these should be on a lune fork, however I am happy to try merge changes which are small in scope.

For both questions I believe it can all be handled by what I am currently referring to as "enrichment" steps. Some explanation of my thought process around this can be found in #142 (comment).

The gist of it is we would be able to define workflow steps as "enrichments" which transform certain parts of wally's functionality. In this case if a package supports the "lune" workflow then a lune specific enrichment could modify the linker files generated to use string requires. These enrichments will be carefully made to work correctly even when multiple workflows are supported, such as a conventional project using rojo for a game and additionally lune for added functionality. There could even be a darklua workflow/enrichment mixed in too. These workflows/enrichments can be thought of as plugins/extensions allowing wally to dynamically support multiple environments in a modular way.

Unfortunately all of this is however theoretical and will take a long time to get implemented. 😕 I'd like to get moving on this asap but I don't have time at the moment and I can't make any guarantees on when I will have time other than not soon.

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

No branches or pull requests

2 participants