Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Adding generated code to VCS #188

Open
timeraider4u opened this issue Sep 28, 2017 · 0 comments
Open

Adding generated code to VCS #188

timeraider4u opened this issue Sep 28, 2017 · 0 comments

Comments

@timeraider4u
Copy link
Member

Independent of whether this project undergoes some re-write or stays as it is, I would like to propose that in the future code generated by ANTLR4/Xtext/Xtend should always be checked in together with the original files.

E.g., when you try to analyse a stack-trace like in #187, and you want to figure out what the code at com.github.jknack.antlr4ide.ui.railroad.trafo.Antlr4RailroadTransformer._toFigure(Antlr4RailroadTransformer.java:88)does, the original file Antlr4RailroadTransformer.xtend is not very helpful. This file has not been change for 4 years now. When I now try to open the corresponding (generated) file Antlr4RailroadTransformer.java I see that line 88 in my local generated file is not in sync with the one reported by the stack-trace (in mine I see that line 88 states final RailroadTrack track = this.factory.createTrack(rule, body); but I guess it should be the line above (87) stating final ISegmentFigure body = this.toFigure(_body);.

The reasons can be manifold, like that the template of the generator changed in the meantime by adding an additional line-comment or whatever. This problem can occur for any generator (ANTLR4, Xtext, Xtend and many more) and can be prevented by also checking in the generated code in the source repository.

@timeraider4u timeraider4u changed the title Generated code Dealing with generated code Sep 28, 2017
@timeraider4u timeraider4u changed the title Dealing with generated code Adding generated code to VCS Sep 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant