Closed Gaspartcho closed 8 months ago
So, I checked this out at first, as a viable alternative after some people suggested it on discord.
The issue with libarchive is that I had a lot of trouble compiling and integrating it, and it's quite a large library for doing something seemingly simple. I did get it working in the end, but there were some issues. I honestly can't remember exactly what they were (something to do with permissions maybe? I can't remember).
What I'd prefer to do is simply vendor microtar, and update the char count. Makes things pretty simple; but it does mean that we don't get the advantages of libarchive, i.e. the ability to extract any type of archive, rather than just zip archives and gzipped tars.
I'd prefer if we didn't, honestly. I could be convinced, I suppose, but based on my first experience trying it, and how things have been working, I'd lean towards no.
There's a branch which had me removing libarchive
from when it was previously in, called remove-libarchive
. Maybe that can give some clues?
Ah. Yes there's a relevant discord discussion on this. It looks like it significantly extended the compile time, and added in extra dynamic runtime dependencies on windows, and ignored it's own compile option when trying to remove those dependencies. Discussion was in #off-topic
on ~2022-11-29 19:58:00 ET
.
It seems better and easier to just fork microtar
, modify it and add support for .tgz
.
Rather than make such a big change.
This has been done, thank you @Gaspartcho !
I am currently looking for ways to implement the changes suggested by @PerilousBooklet, as well as fixing #68 in order to make the install of the
lsp_python
addon possible (Original PR: https://github.com/adamharrison/lite-xl-lsp-servers/pull/14).After doing a bit of research, I found that a solution to all of these problems would be to use librarchive, instead of microtar, zlib and libzip, and use something like this example in replacement of the current
lpm_extract
function.However, this would imply some changes in the build system, which would certainly take me some time (new to C and compiled languages in general).
So before I head straight in, I wanted to check if this was a viable solution in the first place, so I don't have to do everything for nothing.