Submitting exercises with crates

Earlier when submitting the reverse-string exercise I kept getting a fail about a missing crate (for the optional grapheme test).

I was doing this

exercism submit src/

but needed

exercism submit src/ Cargo.toml

I had assumed that Cargo.toml was auto-uploaded using the first command.

It took me a bit of Googling to find the second command. Perhaps the README could be updated to include this?

Or is this included as part of the instructions in subsequent exercises? If it is then it should be included in this one too.

Or, alternatively just mention it once in the hello-world GETTING_STARTED?

I believe exercism submit is the one that automatically submits the “standard” files, icluding and Cargo.toml.

Is there some documentation that instructs students to do exercism submit src/ That should probably be fixed.

Here’s the help page of exercism submit --help. I think this could be improved by explaining the implicit behavior. I think that documentation is even wrong in a way? It looks like the first file is required.

Submit your solution to an Exercism exercise.

    Call the command with the list of files you want to submit.

   submit FILE1 [FILE2 ...] [flags]

  submit, s

  -h, --help   help for submit

Global Flags:
      --timeout int    override the default HTTP timeout (seconds)
      --unmask-token   will unmask the API during a request/response dump
  -v, --verbose        verbose output

Yes, in hello-word -


Yet the tests file itself is not required, even though I modified it to remove the [ignore]!

Thank you! A fix for this is inbound. From now on, just submit with exercism submit. It should always work, with and without dependencies.

1 Like

Yes, students are not able to modify the test file. Even if you upload it, the one that’s used is always one with all #[ignore] directives removed.

I think updating the HELP to default to exercism submit would be wise improvement, and then adding a note explaining that you can also specify files but this is discouraged. I’ll add it to Erik’s list :slight_smile:

1 Like

Thanks, I’ll try this after my next exercise then. :slightly_smiling_face:

Okay, we need to fix this in two places:

  1. The Rust getting started file
  2. The CLI

I can create a PR for the CLI, but I’d like some guidance on what we think the best help message would be. Thoughts?

PR for the Rust track is here.

Suggestion for the exercism CLI help page:

var submitCmd = &cobra.Command{
	Use:     "submit [FILES ...]",
	Aliases: []string{"s"},
	Short:   "Submit your solution to an exercise.",
	Long: `Submit your solution to an Exercism exercise.

	Call the command without any arguments to submit the default set of files.

	Alternatively, you can explicitly provide a space-separated list of files.
	In that case, make sure to submit all the files required for testing.
	For example, some language tracks may require a project manifest to be
	submitted (package.json, Cargo.toml, go.mod...)