nvim-neorocks / rocks

An alternative frontend app for luarocks.org
MIT License
24 stars 1 forks source link

feat: add builtin build step #18

Closed vhyrro closed 3 months ago

vhyrro commented 4 months ago

This PR will add a functional builtin build step for rocks.

Additionally, this PR refactors a few bits and bobs related to the build process to make everything cleaner and more readable with less duplication :)

vhyrro commented 4 months ago

I decided to do something slightly controversial but I believe it's a good decision in the long run (cc @mrcjkb) - I decided to break the rocktree schema and implemented my own.

Instead of the all-over-the-place directory structures I've now reduced a rock tree to the following:

/home/vhyrro/.local/share/rocks/
└── 5.1
    └── neorg@scm-1
        ├── etc // contains extra files (documentation)
        ├── lib // contains shared library objects
        └── src // contains source code for the rock

All rocks have an associated version number and the directories that distinguish various parts of the rock are very clear-cut and easy to understand.

Below are some extra bits of information about this change:

vhyrro commented 4 months ago

All the boilerplate is in place now... all that's left is fixing a weird deserialization issue that I can't figure out quite just yet.

vhyrro commented 4 months ago

Leaving it as-is for now, I'm finding it hard to debug the issue :p

vhyrro commented 4 months ago

This is ready to review now. Not all features are fully set in stone yet, for instance I need to figure out how to read source.defines and source.incdirs. Additionally, more url = "schema://"s need to be supported (only git is supported for now). I'll be working on those in the meantime, exciting to see this feature in a working state :)

vhyrro commented 3 months ago

I recognize that some parts of the code are slightly smelly and imperfect (including the large amount of for loops hah), but I'm not afraid of aggressively refactoring this later down the line once I set up the test suite for this and any potential regression tests. I'm prioritizing development speed over beauty for the time being.

vhyrro commented 3 months ago

Waiting for the CI to complete and I believe we can merge :)