Skip to content

Hotfix/interface files#10

Open
TheRealOwenRees wants to merge 5 commits intoexercism:mainfrom
TheRealOwenRees:hotfix/interface-files
Open

Hotfix/interface files#10
TheRealOwenRees wants to merge 5 commits intoexercism:mainfrom
TheRealOwenRees:hotfix/interface-files

Conversation

@TheRealOwenRees
Copy link
Contributor

  • Auto generate interface files on exercise creation
  • Copy interface files for testing
  • Add interface files to existing exercises

@TheRealOwenRees TheRealOwenRees added the x:rep/small Small amount of reputation label Mar 10, 2026
"exemplar": [
".meta/src/%{pascal_slug}.res"
],
"editor": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a mistake here. https://exercism.org/docs/building/tracks/config-json indicates an editor file is read-only which is not what we want. The interface file will need to go under solution not editor.

Copy link
Contributor Author

@TheRealOwenRees TheRealOwenRees Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 "example": [
      ".meta/%{pascal_slug}.res",
      ".meta/%{pascal_slug}.resi"
    ],

it is added here, so that it populates the src folder.

If I move the current .resi file out of the editor section, there will be no editor file. Would that be correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want the .resi in example, exemplar, and solution for consistency. That makes the interface file available and most importantly editable in the online editor for students, but also then configlet creates it when adding concept and practice exercises so contributors can have their own interface files for the example/exemplar solutions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So example/exemplar section is for writable files in the editor, but the editor section is for non-writable files that we still want to show in the editor for reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this is the case currently. Unless I have missed something. The editor files are created by configlet, and we will need to just change the types on that so the student sees them, and the .resi file should be placed alongside the example file in /src.

It is quite probable that my brain is not full awake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see, there is not a .resi file in the exemplar section. Are we using the example as an exemplar solution too? I have not seen this in the wild before.

Copy link
Member

@BNAndras BNAndras Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exemplars are to concept exercises what examples are to practice exercise for the most part. Exemplar solutions are also shown to mentors inside mentoring discussions so they're expected to be idiomatic (at least for that point in the syllabus...). We'd need to get the test runner to v2 of the test runner interface at a minimum before we can add concept exercises as part of a syllabus, but we might as well set those file path patterns up for concept exercises now.

Copy link
Contributor Author

@TheRealOwenRees TheRealOwenRees Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok that part makes sense.

Should we do that in a separate PR? I have a feeling that this requires renaming the files in .meta to Example.res and Exemplar.res, and give their .resi files as well, which will likely cause a bunch of merge conflicts.

Do examples and exemplar normally go in their own directory inside .meta?

Other than that, I am not sure what to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the .meta/src folder not being written. It is all starting to make sense. No need to change file names then. I will do that now

@TheRealOwenRees
Copy link
Contributor Author

I assume that .meta/src is not written because these are practice exercises. .resi file added but no filename changes because module names are tied to filenames.

Not certain what else to change at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:rep/small Small amount of reputation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants