exercism / haskell

Exercism exercises in Haskell.
https://exercism.org/tracks/haskell
MIT License
493 stars 191 forks source link

Show students what packages are available in the test runner #1045

Open petertseng opened 2 years ago

petertseng commented 2 years ago

The test runner only has a limited set of packages, since it is forbidden from having internet access. If a student submits a package.yaml with a package that is not in that set, there will be an error. To give students a better idea of what packages the test runner has, instead of forcing them to resort to trial and error, the track documentation shown to the students should allow them to discover this. Suggestion for how to do this:

Add an explanation to https://github.com/exercism/haskell/blob/main/docs/TESTS.md#using-packages, containing the following points (which you can paraphrase or refine as necessary):

asarkar commented 2 years ago

I think this is the reason for my word count solution failing with the following error:

Cabal file info not found for regex-tdfa-1.3.1.0@sha256:bec13812a56a904ff3510caa19fe1b3ce3939e303604b1bcb3162771c52311ba,6324, updating
Selected mirror https://hackage.haskell.org/
Downloading root
HttpExceptionRequest Request {
  host                 = "hackage.haskell.org"
  port                 = 443
  secure               = True
  requestHeaders       = [("Accept-Encoding",""),("User-Agent","Haskell pantry package")]
  path                 = "/root.json"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = <assumed to be undefined>, addrCanonName = <assumed to be undefined>}, host name: Just "hackage.haskell.org", service name: Just "443"): does not exist (Try again))

regex-tdfa is a fairly common package from what I can tell, and other tracks do allow for use of regex, so it's not philosophically banned either.

asarkar commented 2 years ago

@petertseng I submitted a PR a week ago, can any of the maintainers take a look?

petertseng commented 2 years ago

Now that I have addressed the above by approving the above PR, we should remember to keep discussion on topic. This issue is about updating the instructions, and discussions in this issue should be focused on that (e.g. questions about how to word the instructions or where exactly they should go, etc.) Discussions about specific packages to be added should be discussed by opening a PR in the haskell-test-runner repo or by a separate issue in this repo.

asarkar commented 2 years ago

Discussions about specific packages to be added should be discussed by opening a PR in the haskell-test-runner repo

Sure, but if a PR sits unattended for a week, then the author has no choice but to try and raise maintainers, by commenting in a ticket where a recommendation has been explicitly made to open such PR. Such a comment can’t be penalized or written off as irrelevant.

petertseng commented 2 years ago

Not to worry - no penalty has been applied that I am aware of, and if there is a penalty applied that I am not aware of, let this comment serve as my authorisation to rescind that penalty.