-
Notifications
You must be signed in to change notification settings - Fork 339
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
Fix concurrency bug in test suite #6850
Conversation
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.
Thanks!
Not manipulating a global env is indeed much better than what we have now!
I have a few comments.
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 suggest some cosmetic fixes.
- Pushed a commit with cosmetics in the HACKING file---but actually wanted to use the suggestion feature.
- Used the suggestion feature. You can batch the suggestions and then apply them together.
Co-authored-by: Andreas Abel <andreas.abel@ifi.lmu.de>
-- hPutStrLn stderr $ unwords $ agdaBin : envArgs ++ args | ||
let agdaProc = (proc agdaBin (envArgs ++ args)) { create_group = True } | ||
let agdaProc = (proc (getAgdaBin env) (envArgs ++ args)) { create_group = True , env = Just env } |
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.
@lawcho: Could this change somehow have triggered
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.
So this is likely a bug in the process
library that only surfaces on macOS
. The fix of this bug suggests that setting cwd
here would workaround this bug, see https://github.com/haskell/process/pull/296/files.
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.
My experiments confirm that indeed this PR surfaced the bug in process
currently affecting GHCs 9.2.8, 9.4.7, and 9.6.3. Sorry, you stepped on a mine here, you take no blame.
Instead of manipulating the system environment, just pass an updated environment when you run the agda process. This way, environment settings from one test case cannot leak into another one in concurrent execution. Commits: * Set subprocess env declaratively * Add back env-var expansion * Use reverse instead of foldl' * Calculate agda env-args without IO * Add type synonym * Purify getAgdaBin * Fix confusion of extra/combined env * Refactor fold * Document .flags and .vars testing infrastructure * Fix whitespace * Update comment * Cosmetic fixes in `.vars` description * Apply suggestions from code review Co-authored-by: Andreas Abel <andreas.abel@ifi.lmu.de> --------- Co-authored-by: Andreas Abel <andreas.abel@ifi.lmu.de>
Fixes #6832