Skip to content

no-op declare compliance with problem-specifications for any input object change #435

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

Merged
merged 32 commits into from
Feb 24, 2018

Conversation

petertseng
Copy link
Member

In exercism/problem-specifications#996 it was proposed that inputs will be moved to the input object.

It was enacted across all the exercises.

For those exercises for which the input type is the only reason the Rust track is no longer up to date, those exercises are now declared to be up to date.

No attempt was made to update any exercise that was out of date for any other reason. The author has no interest in writing the test generators at this time, nor making any changes by hand.

The up-to-date determination was done in the usual manner (https://github.com/petertseng/exercism-problem-specifications/blob/up-to-date/up-to-date/rust.rb).

All commit contents were generated by the following script.
With the exception of queen-attack and robot-simulator (written by hand), all commits messages were also generated by the following script

require 'json'

pr = ARGV.last

repo_root = `git rev-parse --show-toplevel`.chomp
exercise = ARGV.size > 1 ? ARGV.first.delete(?/) : `pwd`.chomp.split(?/).last
ver = JSON.parse(File.read("#{repo_root}/../problem-specifications/exercises/#{exercise}/canonical-data.json"))['version']

version_file = "#{repo_root}/exercises/#{exercise}/Cargo.toml"

lines = File.readlines(version_file)
File.open(version_file, ?w) { |f|
  lines.each { |l|
    f.write(l.include?('version') ? "version = \"#{ver}\"\n" : l)
  }
}

m = "#{exercise} #{ver}: no-op declare compliance with problem-specifications

input object

https://github.com/exercism/problem-specifications/pull/#{pr}"

`git commit --all -m '#{m}'`

puts m

Question:

exercism/discussions#133 (comment)

If test version lived in a separate file in .meta, I'd find it pretty easy to accidentally forget to update it when updating an exercise.

So, does this also apply to the version being in Cargo.toml?

…ations

robot-simulator 2.2.0: Input object (instructions)
exercism/problem-specifications#1166

robot-simulator 2.1.0: Input object
exercism/problem-specifications#1163

robot-simulator 2.0.0: Object instead of string
exercism/problem-specifications#936
exercism/problem-specifications#722
@coriolinus
Copy link
Member

If test version lived in a separate file in .meta, I'd find it pretty easy to accidentally forget to update it when updating an exercise.

So, does this also apply to the version being in Cargo.toml?

No--Cargo.toml is the standard location for a version string in Rust; .meta/version or whatever would be an exercism-specific thing.

Generally speaking this looks good to me. Once Travis has been placated, feel free to merge. Not sure what precisely has gone wrong there; check-exercises.sh produced no output after 10 minutes. I wouldn't be bothered if we had to have it emit a heartbeat dot or something after every exercise check, if it turns out that it actually needed more than ten minutes to run.

Sorry I'm not actually helping more with this, I've started a new job and have far fewer hours per week to give to exercism than I have in the past.

@petertseng
Copy link
Member Author

Once Travis has been placated, feel free to merge

OK that's done (I just reran), so here it comes.

@petertseng petertseng merged commit 3d40647 into exercism:master Feb 24, 2018
@petertseng petertseng deleted the ver branch February 24, 2018 20:19
@petertseng
Copy link
Member Author

petertseng commented Feb 24, 2018

I wouldn't be bothered if we had to have it emit a heartbeat dot or something after every exercise check

Oh, yeah, makes sense, since we add --quiet to DENYWARNINGS, a heartbeat might be necessary. Turns out not to be necessary right now, but might help if we start having enough exercises that we exceed 10 minutes. The weekly builds at https://travis-ci.org/exercism/rust/builds show typical times of 5-6 minutes for that component, so I won't do that yet.

Sorry I'm not actually helping more with this, I've started a new job and have far fewer hours per week to give to exercism than I have in the past.

I accept the apology, because I also don't put in particularly many hours lately. I thought I read somewhere in https://jvns.ca/blog/2014/04/26/i-dont-feel-guilty-about-not-contributing-to-open-source/ that time was a component but turns out I misremembered; the three components were competence, autonomy, and relatedness. But the point I was trying to make was that nobody should feel obligated.

@petertseng petertseng assigned petertseng and unassigned petertseng Feb 25, 2018
@petertseng petertseng added the sync/tests Keep a test suite/version in sync with exercism/problem-specifications label Feb 25, 2018
petertseng added a commit that referenced this pull request Mar 4, 2018
Otherwise, Travis may assume we're hung if we don't produce output in
10+ minutes. Normally we don't think checking all exercises takes this
long, but this prepares for the future and prevents spurious failures in
instances when outside circumstances cause slowness.

This approach was suggested in response to such a failure in
#435 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sync/tests Keep a test suite/version in sync with exercism/problem-specifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants