-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Cabal file info not found / HttpExceptionRequest in exercises diamond and parallel-letter-frequency when running tests after submission #1006
Comments
Oh. It's probably because the test runner for security reasons is forbidden from having internet access. So something will have to change in https://github.com/exercism/haskell-test-runner, similar to how the Rust track had to do exercism/rust-test-runner#27 for theirs. |
I just ran into the same issue. Should an issue be logged for the haskell-test-runner? |
I had a similar issue. I also encountered an issue with |
If I had to hazard a guess (but I have not tested this guess), I would guess that the test runner can currently use any packages that come with GHC, which would be those listed in https://downloads.haskell.org/~ghc/9.0.1/docs/html/libraries/index.html (or whatever version the test runner is using), which explains that |
I notice that as of this writing there is no https://github.com/orgs/exercism/teams/haskell-test-runner (only organisational members can see that page, but as an organisational member I can confirm that it still does not exist). As of this writing there is only one person in https://github.com/exercism/haskell-test-runner/watchers and this person doesn't obviously seem to be in a ready position to solve this problem. So I don't suppose filing an issue in haskell-test-runner is likely to generate more solutions. |
A potential solution may make use of the
Those rough solution steps may need adjustments based on how Stack and Haskell packages work. I have no particular knowledge that would give me an advantage in either, so the steps may be wrong in some details, but the overall thrust of it seems to be in the right direction. There may also be some value in seeing whether https://github.com/ndmitchell/offline-stack and/or https://github.com/AleXoundOS/haskell-stack-mirror-script are suited to this case, but I have not put in the time to examine them and verify whether they are. |
@petertseng Those sounds like very sensible steps. @iHiD could you send me a list of Haskell solutions? I'll extract the packages that are used from those. |
Thanks to @iHiD, I've been able to analyze all the Haskell solutions. As generally speaking people only submit the actual
Hopefully, we can use this to infer which packages to pre-load. |
@petertseng Of the above list, which packages should we be pre-loading in the test runner? We probably don't want to preload them all; for Rust, we've used the top 100 most used packages. |
FWIW, having completed 58 exercisms I found 3 (that I can recall - I can't search by "Failed") that expected additional libraries.
Beyond that the list is endless. I found the restriction to bundled libraries useful for learning - modifying |
I do not know of a good way to determine the package that contains a module. For example, Text.ParserCombinators.ReadP is in If we want to use the top downloaded packages, we are fortunate in that https://hackage.haskell.org/packages/top provides a list. Of course, a solution can start small. For example, a first solution might only add:
|
Question. How is it that |
@petertseng The Dockerfile does a I've created a PR to add the above-mentioned dependencies: exercism/haskell-test-runner#32 |
I can confirm that my (local) test run of FWIW, it also works if you put them under the top level |
Keep in mind that when the PR gets merged, the user will still be none-the-wiser if they happen to add a dependency which is not part of this list, resulting in the same error message in the OP. |
That is correct. This is something the test runner has to support. |
Fixed by exercism/haskell-test-runner#32 |
This is working for me now - previously failing solutions when re-submitted as a new iteration now pass. But I did forget to mention in my earlier comment: it takes a lot longer. Given all packages are installed each time, people will probably notice there's a step change with no obvious cause. In my experience it has gone from about 3 seconds to maybe 10 or more. That's actually pretty good ( |
Are they? The packages are downloaded and installed at build time, when the Docker container is built. It shouldn't affect the actual run time. |
Ah, my mistake. "build time" is not triggered every time. |
I must have forgotten to recommend the adding of
|
My (earned with blood!) solution to robot-name is still suffering rejection because of "missing" Is it maybe related to me starting the exercise at some time in the summer still on v2, and eventually solving it only today? |
Hmm, I concur. I opened the exercise for the first time and used the online editor. I get:
Perhaps the fix was only good for uninstalled libraries, not hidden ones. |
Yes, this is what I get as well. Then probably nothing to do with having downloaded it before. In fact, this is similar what I got when submitting bob with
Which seems different from the original bug that started this issue. Interestingly, |
(cc @ErikSchierboom - Could you look into this one pls) |
@adql I think might indeed be a new bug. I've tried adding it to the |
@ErikSchierboom Not much of a clue, I'm not familiar with the machinery at the backend. Anyway, when I try the haskell-test-runner locally both bob and robot-name pass. How much of the exercise directory is actually uploaded to the server when running |
All files that are present in the exercise's directory in the track repo are checked out, with the user-submitted files overwriting any files. |
For
for those exercises using |
Ok, my bad for not having understood before that I should also submit That said, it may be helpful to add an instruction to submit |
Here is how future items should be handled: If the error is If the error is of the form:
then the advice in #1006 (comment) applies. It's too much to keep talking about two different errors in the same issue, because then it's hard to tell what's relevant to what. Discussion about |
The test passed on my machine, but when I submitted the code I got an error message:
I search a bit and found this, which could be the same issue.
The text was updated successfully, but these errors were encountered: