Page 1 of 1

Support symlinks in mod zip files

Posted: Thu Oct 31, 2024 1:03 pm
by Lexxy Fox
Why? Because it's not too complex of a feature, it shouldn't be too hard to implement, and mod authors shouldn't have to worry about the unzip implementation - they should have files just work.

Screenshot depicting what happens when I try using a symlink:
Screenshot_20241031_080002.png
Screenshot_20241031_080002.png (38.67 KiB) Viewed 426 times
  • Yes, I'm aware of recursion. The popular software [redacted] limits the maximum number of symlinks resolutions to either 40, 20, 8, or 5 depending on which one / version of the software is used. Any of those values would be sufficient. Even just a single resolution (1) would be better than the current 0, and then error out if a symlink points to another symlink (I'd still prefer at least 5 though).
Thank you.

Edit: I wasn't sure if this should go here or in the Modding Interface Requests. Please move if necessary, thanks! Or I can delete and re-post, whichever.

Re: Support symlinks in mod zip files

Posted: Fri Nov 01, 2024 3:47 pm
by Tinyboss
Are symlinks supported on all platforms where Factorio runs?

Re: Support symlinks in mod zip files

Posted: Fri Nov 01, 2024 4:05 pm
by Lexxy Fox
I've investigated a little and I believe Factorio handles the mod zip files, not the platform. Iff that's true then it doesn't matter if the platform supports symlinks. If this isn't true then I'm requesting that Factorio handles mod zip files, and not the platform.
  • Yes - I understand that Factorio supports mods in plain folders.

Re: Support symlinks in mod zip files

Posted: Fri Nov 08, 2024 5:33 pm
by Lexxy Fox
If you have other priorities - let me do it. I'll do it for $0.

Re: Support symlinks in mod zip files

Posted: Fri Nov 08, 2024 7:06 pm
by Tinyboss
Lexxy Fox wrote: Fri Nov 01, 2024 4:05 pm I've investigated a little and I believe Factorio handles the mod zip files, not the platform. Iff that's true then it doesn't matter if the platform supports symlinks. If this isn't true then I'm requesting that Factorio handles mod zip files, and not the platform.
  • Yes - I understand that Factorio supports mods in plain folders.
Would it make it difficult for someone on Windows to do dev work on a mod that uses symlinks? Requiring WSL or something would be a significant barrier to beginners who just want to try some tweaks, which by itself has a very low barrier to entry.

Re: Support symlinks in mod zip files

Posted: Sat Nov 09, 2024 4:17 am
by silasary
Tinyboss wrote: Fri Nov 08, 2024 7:06 pm Would it make it difficult for someone on Windows to do dev work on a mod that uses symlinks? Requiring WSL or something would be a significant barrier to beginners who just want to try some tweaks, which by itself has a very low barrier to entry.
Windows has had full symlink functionality since Windows XP. As of Windows 10, it's even available as a simple CMD command

Re: Support symlinks in mod zip files

Posted: Sat Nov 09, 2024 1:08 pm
by Tinyboss
silasary wrote: Sat Nov 09, 2024 4:17 am Windows has had full symlink functionality since Windows XP. As of Windows 10, it's even available as a simple CMD command
Oof, my bad. Sorry for the misinformation.

Re: Support symlinks in mod zip files

Posted: Sun Nov 10, 2024 9:26 pm
by Lexxy Fox
Tinyboss wrote: Fri Nov 08, 2024 7:06 pm
Lexxy Fox wrote: Fri Nov 01, 2024 4:05 pm I've investigated a little and I believe Factorio handles the mod zip files, not the platform. Iff that's true then it doesn't matter if the platform supports symlinks. If this isn't true then I'm requesting that Factorio handles mod zip files, and not the platform.
  • Yes - I understand that Factorio supports mods in plain folders.
Would it make it difficult for someone on Windows to do dev work on a mod that uses symlinks? Requiring WSL or something would be a significant barrier to beginners who just want to try some tweaks, which by itself has a very low barrier to entry.
This is incorrect. Designing to work around broken software makes more broken software. Broken software makes it harder for beginners who just want to try some tweaks, which by itself has a very low barrier to entry.

We've both said our piece so no more off-topic discussion, thank you.

Re: Support symlinks in mod zip files

Posted: Sun Nov 10, 2024 9:33 pm
by Tinyboss
Lexxy Fox wrote: Sun Nov 10, 2024 9:26 pm This thought is incorrect. Designing to work around broken software makes more broken software. Broken software makes it harder for beginners who just want to try some tweaks, which by itself has a very low barrier to entry.

We've both said our piece so no more off-topic discussion, thank you.
I don't think you're a mod, so I'll go ahead and respond to you, thanks!

First of all, I don't do any of my professional dev work on Windows, but people do. And I still might, for modding, since that's where I play Factorio. We both agree barriers to entry should be as low as possible, and that means ideally making it easy for all platforms supported by the game.

Second, it's not off-topic. It's about the merits and consequences of your suggestion.

Finally, a helpful poster already pointed out to me that it isn't even true that Windows can't do it, so nothing is broken here. My objection is moot, but it was never off-topic.

Re: Support symlinks in mod zip files

Posted: Sun Nov 10, 2024 10:02 pm
by Lexxy Fox
Tinyboss wrote: Sun Nov 10, 2024 9:33 pm
Lexxy Fox wrote: Sun Nov 10, 2024 9:26 pm This thought is incorrect. Designing to work around broken software makes more broken software. Broken software makes it harder for beginners who just want to try some tweaks, which by itself has a very low barrier to entry.

We've both said our piece so no more off-topic discussion, thank you.
I don't think you're a mod, so I'll go ahead and respond to you, thanks!

First of all, I don't do any of my professional dev work on Windows, but people do. And I still might, for modding, since that's where I play Factorio. We both agree barriers to entry should be as low as possible, and that means ideally making it easy for all platforms supported by the game.

Second, it's not off-topic. It's about the merits and consequences of your suggestion.

Finally, a helpful poster already pointed out to me that it isn't even true that Windows can't do it, so nothing is broken here. My objection is moot, but it was never off-topic.
Look, I can respond to you too :D

"We both agree barriers to entry should be as low as possible, and that means ideally making it easy for all platforms supported by the game."

Yes, exactly! If someone chooses to use broken or differing software, then they should be responsible for making sure it's compatible or working around it.

Example: if a beginner makes a mod with a symlink (because it's just files), and then another user comes along and tweaks it but then decides (because they are responsible for the software they use) to break a link, it'll cause issues for upstream who shouldn't care what a symlink is.

Re: Support symlinks in mod zip files

Posted: Sun Nov 10, 2024 11:16 pm
by EustaceCS
Lexxy Fox wrote: Thu Oct 31, 2024 1:03 pm Why? Because it's not too complex of a feature, it shouldn't be too hard to implement, and mod authors shouldn't have to worry about the unzip implementation - they should have files just work.
Which exact modding problem it would gonna solve?
Are there any feature in Factorio modkit which demands shoehorning files through symlinks?

"because it's easy" is a bad justification since time is non-renewable resource and it probably should be spent onto something with more palpable impact.

Re: Support symlinks in mod zip files

Posted: Mon Nov 11, 2024 1:34 pm
by Lexxy Fox
EustaceCS wrote: Sun Nov 10, 2024 11:16 pm
Lexxy Fox wrote: Thu Oct 31, 2024 1:03 pm Why? Because it's not too complex of a feature, it shouldn't be too hard to implement, and mod authors shouldn't have to worry about the unzip implementation - they should have files just work.
Which exact modding problem it would gonna solve?
Are there any feature in Factorio modkit which demands shoehorning files through symlinks?

"because it's easy" is a bad justification since time is non-renewable resource and it probably should be spent onto something with more palpable impact.
No feature in the modkit demands anything. But sometimes symlinks exist because it's the easiest route. I was in a situation where there could have been for loops that iterated over sets of files, but some of the files have the same content. Without linking the files I had two choices: I could either use loops and duplicated the files, or not dupe the files but explicitly write the lists. "shoehorning" is a bit of a stretch though. I agree that time is a non-renewable resource and it's definitely a lower priority issue, but I could do it right now if they let me. I'm not trying to discredit the value of Wube's devs in saying so - quite the opposite. I have the time, so just let me do it.