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

Available packages #485

Open
edgerunner opened this issue Apr 11, 2022 · 11 comments
Open

Available packages #485

edgerunner opened this issue Apr 11, 2022 · 11 comments

Comments

@edgerunner
Copy link
Contributor

A recent conversation in the Exercism Slack revealed that some packages in the elm/… namespace are available for the exercises. Unfortunately I had to dig that information out, and possibly most learners wouldn't even be aware of that possibility.

I think we should list the available packages somewhere in the Elm-specific documentation.

@jiegillet
Copy link
Contributor

We should absolutely add that somewhere. I'm not sure where though?
Maybe docs/INSTALLATION.md (adding a section on how to install packages and explaining the situation here), or docs/TESTS.md and add something about available packages on the test runner?
No perfect fit... @mpizenberg what do you think?

For CLI users, we should mention something in exercises/shared/.docs/tests.md, which ends up in the locally downloaded HELP.md. We should say that extra packages won't be ran on the online test-runner or analyzer.

Something else that might be nice would be to add all of the elm.json as editor files (read-only). It wouldn't be very useful most of the time, but it would only be a click away in the editor.

@edgerunner would you like to help with some of that?

@mpizenberg
Copy link
Member

mpizenberg commented Apr 11, 2022

I think those are all good ideas. In docs/INSTALLATION.md we could add a small section about dependencies being installed in the elm.json. There, we could explain that only a small subset of dependencies are usable by default for two reasons, (1) we do not want students to just download packages to solve problems, and (2) we need to pre-install that subset of packages on the exercism test runner for the elm track, which runs offline so it cannot download packages added by users.

In docs/TESTS.md we could mention again point (2). And a message for CLI users in exercises/shared/.docs/tests.md sounds good too!

Adding elm.json to the read-only editor files for people using the online editor is also a good idea!

@ceddlyburge
Copy link
Contributor

It would be nice to see it in the instructions for the exercise as well, although that would require adding it to the .md file for every exercise, which would be a bit cumbersome, but maybe we can leverage configlet or something like that to automate it.

@edgerunner
Copy link
Contributor Author

I think the best spot could be the instructions. Is there a way to add another track-wide section similar to /exercises/shared/.docs/debug.md?

OTOH, I think exposing a read-only elm.json could turn out to be confusing for some users.

@edgerunner
Copy link
Contributor Author

As a short-term hack, what if we sneak that information into debug.md?


Available libraries

The following libraries from the Elm package registry are installed by default. You can use them by importing their modules directly like so:

import Parser exposing (Parser, (|.), (|=), succeed)

Most exercises are designed to be completed by using the elm/core library alone, but you may use these as well if you like. Other libraries from the Elm package registry are not available.

Debugging

@jiegillet
Copy link
Contributor

I'm a bit reluctant to hijack debug.md. Even if we do, let's minimize the precious vertical space make it a single paragraph.

I asked on the Slack maintainer channel how other people do this.

@edgerunner
Copy link
Contributor Author

Trying to figure this out: Would it work if we added another file (a PACKAGES.md maybe?) to config.json? Where would that show up?

@ceddlyburge
Copy link
Contributor

Hi Mert, there is a bit of chat about this on the exercism slack, I think it might be easier to have the conversation there.

https://exercism-team.slack.com/archives/GC3K95MRR/p1649725980776879

@mpizenberg
Copy link
Member

Somewhat related. There is now a new key for the meta config.json files of exercises which is called invalidator. This is to mark files that mark a solution as outdated when changed.

https://github.com/exercism/docs/blob/1b7228fc2ceeb47babf122311d001a61e5dc6f7a/building/tracks/concept-exercises.md#file-metaconfigjson

Since we want the elm.json changes to mark solutions as outdated, we should at least add the elm.json to either the editor key or the invalidator key. And if we add it to the editor key, at least it is a solution to the question of which packages are available.

We can also do the rest of the ideas proposed here in complement. Waiting on answers in the slack discussion where Cedd just put a reminder message.

@edgerunner
Copy link
Contributor Author

@ceddlyburge the link doesn't seem to work. Can you ping me in that thread directly in slack?

@ceddlyburge
Copy link
Contributor

I think it was a private channel or something. I've mentioned you directly and invited you I think. Cheers, Cedd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants