-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow include
d/load
'd files to use tilt extensions
#3452
Comments
@victorwuky is this relatively simple enough that it might land soon, or is it more likely a ways down the line? |
@victorwuky for what it's worth, while it would definitely be nice for extensions to also load files, it seems to me like that's less important than the ability for non-extension, local includes to be able to make use of existing extensions. |
Thanks @kogi for the comment. Right now we don't have a clear timeline of when we'd pick up this feature in particular. |
@kogi to give a little more context, it turns out this feature isn't actually that simple because (among other things) we'd need to do a lot of work around handling working directories and all the inevitable edge cases. So--we'll keep you posted! |
include
d files to use tilt extensionsinclude
d/load
'd files to use tilt extensions
@maiamcc can you elaborate a bit more on why this is difficult to solve? Ya, it seems like this should be much higher priority if it blocks the ability to use the restart_process extension |
@maiamcc Your comment on tilt-dev/tilt-extensions#37 makes me think you might be confusing two different issues:
|
# 1 would be nice |
@maiamcc how do you feel about removing the restart_process deprecation warning until this issue is resolved? seems like this issue is a blocker to adoption of restart_process. |
Ugh yeah I was hoping it wouldn't be that hard to fix this issue, but since it's almost 3, I guess I'll revert the deprecation warning for today's release :-/ |
This should be fixed in the latest release -- let us know if you run into any trouble! |
Woo! Works like a charm! Thank you all! |
It's very helpful to be able to organize your tiltfile by separating sections out into smaller files that can be included into the main Tiltfile. However, those sub-files are unable to make use of tilt extensions. There are 2 ways we can fail at this:
Attempt, the first
Main Tiltfile
Other Tiltfile
This fails with:
Error: cannot load ext://git_resource: extensions cannot be loaded from `load`ed Tiltfiles
which is confusing, since this file wasinclude
d, notload
ed.Ok, so let's load the extension first, and then include our sub-file...
Attempt, the second
Main Tiltfile
Other Tiltfile
This one fails with:
Error: /path/to/otherfile.tilt:1:1: undefined: someFunction
which suggests the included file doesn't share global context with the main tiltfile.*If included files aren't capable of using extensions, it creates a major limitation to organizing our scripts in this fashion.
The text was updated successfully, but these errors were encountered: