Skip to content

Conversation

@mrcjkb
Copy link

@mrcjkb mrcjkb commented Aug 28, 2025

This is my attempt to kickstart #225.

Some caveats:

  • I've never worked with moonscript, lapis or OpenResty, but based on my analysis of the existing code in applications/manifest.moon and helpers/manifests.moon, this may be enough to add the capability to serve a zipped json manifest?
  • I don't know how to generate Lua code from the moonscript code.
  • I have been unable to set up a dev environment using the guide in the readme.

The tup command fails with:

  11) [0.072s] views: moonc about.moon                                                                                      
  10) [0.062s] moonc revision.moon                                                                                          
   9) [0.057s] moonc models.moon                                                                                            
   8) [0.049s] moonc lint_config.moon                                                                                       
   7) [0.052s] moonc config.moon                                                                                            
   6) [0.068s] moonc migrations.moon                                                                                        
   5) [0.059s] moonc app.moon                                                                                               
*   4) compile_js views/edit_module.lua > views/edit_module.js                                                              
/bin/sh: line 1: lapis-eswidget: command not found
 *** tup messages ***
 *** Command ID=790 failed with return value 127
*   3) compile_js views/index.lua > views/index.js                                                                          
/bin/sh: line 1: lapis-eswidget: command not found
 *** tup messages ***
 *** Command ID=792 failed with return value 127
*   2) compile_js views/stats.lua > views/stats.js                                                                          
/bin/sh: line 1: lapis-eswidget: command not found
 *** tup messages ***
 *** Command ID=794 failed with return value 127
 [                                          ETA~=<1s Remaining=2   Active=0                                           ]  98%
 *** tup: 3 jobs failed.

(this is after setting up the luarocks path).

  • This would probably need some tests, but without being able to set up a dev environment,
    I don't want to risk wasting too much effort.

Perhaps someone who is more familiar with this codebase is willing to pick this up if it's going in the right direction?


params = assert_valid @params, types.params_shape {
{"format", types.nil + types.one_of {"json", "zip"}}
{"format", types.nil + types.one_of {"json", "zip", "json.zip"}}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess a "manifest.json.zip" request will be parsed as format = "zip"?

Copy link
Author

@mrcjkb mrcjkb Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think /manifest(-:a.:b)(.:format) will also successfully parse manifest-5.1.json.zip.

@mrcjkb mrcjkb force-pushed the mj/push-kvzqpmmwqzmm branch from 18b7da5 to 73234ef Compare December 29, 2025 20:13
@mrcjkb
Copy link
Author

mrcjkb commented Jan 7, 2026

@leafo is there anything I can do to move this forward?

Downloading zipped Lua manifests isn't an option for me until the luajit bug that prevents loading large tables is fixed. And unzipped json manifests take too long to download.

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.

1 participant