Replies: 6 comments 7 replies
-
I just looked at some Mason registry entries. It's becoming obvious to me that Mason is, by its very nature, extremely "online". I understand that, and how difficult it would be to change. So, how about making my Mason install dir portable? I need to be able to create it in one context (internet visible Ubuntu), and then airlift it into a different context (no internet Redhat). For example, I see that the sym-links created in mason/bin are absolute, but they could be relative (or will this break something, like Windows compatibility?). But ok, I could script-hack that. What's really getting me is the python LSP/etc are installing themselves probably with pipx which creates a venv with links of absolute paths to the python on my "build side". Well, I guess I could script hack those too (I am including a full Python env in my nvim build dir). It's looking like I need to create a sym-link relative'izer to run on the full dir tree. Of course, there are binaries. I may be lucky here. I think binaries built in my WSL/Ubuntu are compatible with Redhat 8. I just copied the ruff binary over to the Redhat system and it runs ok (I'll deal with missing .so if/as needed). I feel like I'm wandering down a doomed path. Ie, 10 hours of work and then I find that one little thing I didn't think of and can't solve. Anyone have any comments/ideas? |
Beta Was this translation helpful? Give feedback.
-
Looks like I'm on my own. Fair 'nuf. I'll start by changing all sym-links to relative and see where I stand after that. |
Beta Was this translation helpful? Give feedback.
-
Interesting idea, and that's exactly what I'm trying to achieve too. Seems that Mason2.0 provides a relative symlink, which works fine for clangd binary, but not python venv. ("Works fine" means that I could copy the whole mason directory to another machine and the lsp still work) python venv is not quite portable, as all executable script has a absolute path shebang, so, when copying the whole venv to another machine, we can't use it directly & correctly, even we got the same python version. For python venv, in order to make it portable, we need to use |
Beta Was this translation helpful? Give feedback.
-
Hello! I'm not sure I follow how mason.nvim would function without internet access? The only time internet access is needed is when installing a package, once installed it's made available regardless of whether you have internet access or not. Copying the entire Mason directory from another system is not really supported mainly because of absolute links (#1156), which will be changed to relative in v2.0. As you've mentioned there may also be executables created during installation that use absolute paths (Python venv executables for instance). If you do this you'll want to install the packages on an identical system with glibc compatibility. Tbh I'd recommend perhaps not using Mason if you're on such a closed off system (which probably is closed off for good reason) and instead use alternatives. |
Beta Was this translation helpful? Give feedback.
-
@williamboman Need some help on changing the generated absolute path of Is the Is it possible to hack around the script-generation procedure, so that i can change the absolute path? |
Beta Was this translation helpful? Give feedback.
-
@williamboman I have another offline issue. Mason is hard-stopping my :checkhealth while offline. It won't even proceed after a timeout. Is there a way to a) have it respect a timeout, and b) set the timeout value myself (I will set it very small, like 1s)? |
Beta Was this translation helpful? Give feedback.
-
I did some searching. Found Gongfarmer talking about a corp proxy (and fixes that went way over my head). The firewall I'm working behind is a brick wall (zero internet access). I am trying to come up with a LazyVim/Mason config on an internet visible machine (WSL/Ubuntu) and then transfer over to the brick-walled environment (Redhat8) and have it Just Work™️. I can do updates on my internet machine. And I can transfer files over the brick-wall, but that's it.
I just tried rsync'ing everything over (including ~/.local/share/nvim), and as expected, ran into something. When ruff-lsp is installed, a python venv is created (based on /usr/bin/python3). Those symlinks are no longer valid on the Redhat system. The specifics are irrelevant. I knew something would come up.
The way I get around it with LazyVim.
Can I do the same in Mason? I need Mason to reference my local file:// urls that I will pre-establish with git clones (git clone --mirror). Then the install steps will be followed on the other side of the wall upon first invocation.
Thanks!
--Myles
[I will just vent a little: It has been very frustrating with the entire nvim ecosystem assuming that every invocation of nvim will have internet visibility. I'm pretty sure offline is a very common thing.]
Beta Was this translation helpful? Give feedback.
All reactions