-
Notifications
You must be signed in to change notification settings - Fork 77
Respect SAW_IMPORT_PATH
#2761
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
Respect SAW_IMPORT_PATH
#2761
Conversation
|
16 tests now fail because of changes in error messages that look like this: - within "x" (unify009.saw:20:6-20:7)
+ within "x" (./unify009.saw:20:6-20:7)This is because the default |
Yes, I think we should drop the leading |
brianhuffman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should go ahead and fix the leading "./" thing; other than that everything looks good to me.
This old definition of `findFile` was only needed for ancient versions of GHC that SAW no longer supports.
Due to an oversight, the `SAW_IMPORT_PATH` environment variable (or, equivalently, the `-i`/`--import-path` command-line options) were being blatantly ignored by SAW. This fixes that oversight by restricting the API in `SAWScript.Import` to a single exported function (`findAndLoadFile`), which always consults `SAW_IMPORT_PATH` before attempting to load a file. Fixes #2756.
8b1ad79 to
b9881b5
Compare
|
I opted to fix this by using |
|
Using The Windows integration tests CI job is already allowed to fail, so this doesn't affect whether the overall CI passes or not. Still, it does mean that if we ever did want to make the integration tests all pass on Windows, this PR would give us more work to do. Would folks be OK with accepting this? I could foresee ways to make the test suite more robust to Windows-style path separators (e.g., by making the test-diff infrastructure less sensitive to path-separator differences), but it would take some work to implement this. |
|
Go ahead and merge and I'll take care of it. It should let me remove some annoying hacks I had to add in the last run. (The prior state of things was that some paths came out with |
Due to an oversight, the
SAW_IMPORT_PATHenvironment variable (or, equivalently, the-i/--import-pathcommand-line options) were being blatantly ignored by SAW. This fixes that oversight by restricting the API inSAWScript.Importto a single exported function (findAndLoadFile), which always consultsSAW_IMPORT_PATHbefore attempting to load a file.Fixes #2756.