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

Don't change directories when interpreting files #1791

Open
samcowger opened this issue Dec 21, 2022 · 0 comments
Open

Don't change directories when interpreting files #1791

samcowger opened this issue Dec 21, 2022 · 0 comments
Labels
tech debt Issues that document or involve technical debt type: enhancement Issues describing an improvement to an existing feature or capability

Comments

@samcowger
Copy link
Contributor

A while ago, #17 was originally fixed by changing directories when interpreting files. Recently, in #1770, a latent bug introduced by this behavior was fixed. As @kquick mentions here, though, this directory-changing behavior is a bit clumsy by nature.

The better thing to do would be to maintain the "current" directory in an environment, and when interacting with a file system, prepend that directory to the filename as it appears. This will still allow for the relative imports the author of #17 desired, while more neatly eliminating the bug fixed in #1770.

This is low-priority, especially if the likes of SAWScript.Interpreter.interpretFile is never used in a library context, but the fix would still benefit the health of the codebase.

@samcowger samcowger added type: enhancement Issues describing an improvement to an existing feature or capability tech debt Issues that document or involve technical debt labels Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Issues that document or involve technical debt type: enhancement Issues describing an improvement to an existing feature or capability
Projects
None yet
Development

No branches or pull requests

1 participant