Add an option to make the [deps] & [remap] sections of .import files use relative paths #13055
Replies: 1 comment
-
Actually, this problem is solvable by using symlinks and submodules simultaneously: add a submodule to your main/ repo (anywhere you like) add .gdignore to main/submodule (and gitignore the .gdignore so you dont push that to the original submodule repo) now add a symlink in main/ to main/submodule/internals (after moving all the important stuff in submodule to submodule/internals) Now we get all the benefits: godot only sees res://internals in both the submodule and the main repo we still maintain a record of the commit we are pointing to, as git still sees the main/submodule folder I'm going to close this discussion as it doesn't need implementing. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I believe this is the only thing preventing submodules from being pain-free within a Godot workflow at the moment (?).
In these sections of .import files:
If these paths were listed as relative to the current directory of the .import (or relative to the file being imported), then adding a submodule of another project (and then sparse checking out everything but the project.godot) would mean that there would not need to be any changes within the .import file. The same information could be extracted from the .import file by just concatenating the current directory with the relative path.
Currently, adding (sub)projects as submodules means that every time you switch repos, the .import files will change as their absolute paths won't be the same.
Maybe I'm missing something of course. Does anyone know if having absolute paths listed in .import files is needed? Of course, the default could still be kept as absolute paths. There could just be an option in the editor settings to make them relative.
If anyone has any thoughts / ideas it would be great to discuss
Beta Was this translation helpful? Give feedback.
All reactions