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

Submitting exercises requires metadata #95

Closed
samWson opened this issue Sep 5, 2018 · 4 comments
Closed

Submitting exercises requires metadata #95

samWson opened this issue Sep 5, 2018 · 4 comments
Labels
bug Something isn't working CLI integration Concerns integration of Pharo with the Exercism CLI

Comments

@samWson
Copy link
Contributor

samWson commented Sep 5, 2018

Our fix to #32 may have an effect on this one.

I tried going through the exercise submission process on macOS as a user so I could get an idea for what needed to be done for using http instead of OSProcess to solve our Windows issues.

I made my solution to HelloWorld, selected submit from the UI and got the following error: Error: Unable to submit solution, CLI reported #('' 'Error: not in workspace')

exercism troubleshoot at the command line shows that my workspace is at /Users/samuelwilson/Exercism while my Pharo vm is running from /Users/samuelwilson/Exercism/pharo in accorance to our installation instructions.

The fix to this seems simple: the command for the CLI which is assembled in ExercismManager>>#submitToExercism: just needs to have a file path that starts from the Exercism workplace.

However we have an additional issue.

Just to be sure I tried exercism submit pharo/hello-world/.pharo/HelloWorld.class.st at the command line from my workspace directory and got another error:

The exercise you are submitting doesn't have the necessary metadata.
    Please see https://exercism.io/cli-v1-to-v2 for instructions on how to fix it.

My CLI is version 3.0.9, the latest at this time. I tried downloading the HelloWorld exercise using the CLI instead of our built in Pharo solution, then copied a Tonel file with the solution into the pharo/hello-world/.pharo directory. I used the command line to submit from there and it worked that time.

The missing meta data might be the .solution.json file in the root of the pharo/hello-world directory. This along with README.md and HelloWorldTest.class.st are the files that are downloaded by the CLI.

Our approach of bringing the exercise straight into the image when downloading means these files were not downloaded, and it seems the .solution.json is required meta data. This might be a exercism v1 vs v2 difference that we missed.

@samWson samWson added bug Something isn't working CLI integration Concerns integration of Pharo with the Exercism CLI labels Sep 5, 2018
@macta
Copy link
Contributor

macta commented Sep 5, 2018

When we were just shelling to the command line this all worked fine - this is a consequence of moving easy from the CLI and not having finished the job yet.

We can fix this for OS X if we preserve the half way house we have OR we sort the other half out, and yes it has to deal with the meta data (which I’m guessing the submission profocil will specify)

@bencoman
Copy link
Contributor

bencoman commented Sep 6, 2018

@bencoman
Copy link
Contributor

bencoman commented Sep 6, 2018

Leaving this issue to deal with submitting solutions via the CLI, I opened #96 to deal with going direct.

@samWson samWson closed this as completed Nov 17, 2018
@samWson
Copy link
Contributor Author

samWson commented Nov 17, 2018

Since #96 is now fixed we are fetching and submitting all exercises using HTTP instead of the CLI. Closing this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI integration Concerns integration of Pharo with the Exercism CLI
Projects
None yet
Development

No branches or pull requests

3 participants