Skip to content
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

Including scripts by relative reference #303

Closed
aartiPl opened this issue Feb 3, 2021 · 1 comment · Fixed by #330
Closed

Including scripts by relative reference #303

aartiPl opened this issue Feb 3, 2021 · 1 comment · Fixed by #330
Labels

Comments

@aartiPl
Copy link
Collaborator

aartiPl commented Feb 3, 2021

I have seen issue #218 and from that ticket, it looks like the problem is already solved, but in my opinion, it's not, or at least not in all cases.

Please consider the following directory structure:
obraz

service-script-a.kts includes common-script-a.kts. But common-script-a.kts includes internally common-script-b.kts.
Now when I execute service-script-a.kts I get error:

[kscript] [ERROR] Failed to resolve //INCLUDE 'common-script-b.kts' [[kscript] [ERROR] /home/vagrant/workspace/Kod/GitRepos/TestCase/service-a/common-script-b.kts (No such file or directory)]

Fixing it shouldn't be difficult - it is enough to include files always relatively to the file which does the include. Without that, it is not possible to correctly structure scripts and encapsulate pieces of code.

I am attaching the above very simple test-case as a zip file.

TestCase.zip

@holgerbrandl
Copy link
Collaborator

Indeed this should work. Feel welcome to provide a PR. I could/will also have look, but I'm pretty much booked out at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants