Closed Bajger closed 2 years ago
I don't grok how the generator works. Will these changes be safe from being overwritten?
I don't grok how the generator works. Will these changes be safe from being overwritten?
ExercismGenerator is safe to use, since you execute generation on demand from Pharo and you can choose output directory where file artefacts are generated (it is under control and responsibility of developer - see ExercismGenerator>>generateSourceFilesFor: packageOrTag to: filePathString). I just used those two files that have been changed and overwritten manually solution and test class files. Rest of files remain unchanged (I didn't copied them). In other words: Reference implementation in dev/src/Exercise@
|gen aRef aPackage|
aPackage := RPackageOrganizer default packageNamed: 'Exercise@HighScores'.
aRef := FileLocator imageDirectory.
gen := ExercismGenerator new.
gen exercisesPath: aRef pathString .
gen exTonelWriter: (ExTonelWriter on: aRef).
gen generateSourceFilesFor: aPackage to: aRef.
There is a way to generate all files from world menu, but it generates artefacts for all exercises at once. This isn't necessary, if you work on just one concrete exercise. So instead of this: We could have this (for concrete Exercise):
Please ignore my previous message. Need to regenerate files...
@glennj or @SleeplessByte : PR can be merged now. Thanks!
Thanks @Bajger !
@glennj : Feel free to review. It should contain your improvements on High Scores. I've had little struggle with generator, but achieved to get the solution and test files.