-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix(regression): add created source files to spoon input #70
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6220d47
add project to showcase the problem with javacc
MartinWitt d1e70d8
ignore testcase tempoary
MartinWitt f5c324b
remove version tag
MartinWitt aa88130
remove version tag
MartinWitt 1c1c46e
add dependency
MartinWitt 74f3d70
fix pom
MartinWitt 1486774
fix generated src file inclusion, change mvn install -> package
MartinWitt 859c194
add missing changelog for version 3.4 and 3.4.1
MartinWitt d412d6c
according to the research, adding to compileSourceRoot is not needed.…
MartinWitt 9cf0d45
remove unneeded lines
MartinWitt ba44287
update testcase, because file input has changed
MartinWitt a076af1
remove unused import
MartinWitt 63d86dc
update changelog
MartinWitt fecece2
update javadoc
MartinWitt b6e5f5a
update javadoc
MartinWitt fa271fc
update changelog and readme
MartinWitt 86a1c17
fix formatting
MartinWitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>test.javacc.spoon</groupId> | ||
<artifactId>foo</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
<dependencies> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>javacc-maven-plugin</artifactId> | ||
<version>2.6</version> | ||
<executions> | ||
<execution> | ||
<id>javacc</id> | ||
<goals> | ||
<goal>javacc</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>net.java.dev.javacc</groupId> | ||
<artifactId>javacc</artifactId> | ||
<version>7.0.6</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>fr.inria.gforge.spoon</groupId> | ||
<artifactId>spoon-maven-plugin</artifactId> | ||
<version>3.5-SNAPSHOT</version> | ||
<executions> | ||
<execution> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>generate</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<includeTest>false</includeTest> | ||
<includeSource>true</includeSource> | ||
<noClasspath>false</noClasspath> | ||
<debug>true</debug> | ||
<processors> | ||
<processor>fr.inria.gforge.spoon.mojo.CountStatementProcessor</processor> | ||
</processors> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<groupId>fr.inria.gforge.spoon</groupId> | ||
<artifactId>processors</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
19 changes: 19 additions & 0 deletions
19
src/test/projects/javacc-generate/src/main/java/test/javacc/spoon/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.javacc.spoon; | ||
|
||
import generate.javacc.spoon.Example; | ||
/** | ||
* Hello world! | ||
*/ | ||
public final class App { | ||
private App() { | ||
} | ||
|
||
/** | ||
* Says hello to the world. | ||
* @param args The arguments of the program. | ||
*/ | ||
public static void main(String[] args) { | ||
Example example = new Example(System.in); | ||
System.out.println("Hello World!"); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/test/projects/javacc-generate/src/main/javacc/Example.jj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
PARSER_BEGIN(Example) | ||
package generate.javacc.spoon; | ||
/** Simple brace matcher. */ | ||
public class Example { | ||
|
||
/** Main entry point. */ | ||
public static void main(String args[]) throws ParseException { | ||
Example parser = new Example(System.in); | ||
parser.Input(); | ||
} | ||
|
||
} | ||
|
||
PARSER_END(Example) | ||
|
||
/** Root production. */ | ||
void Input() : | ||
{} | ||
{ | ||
MatchedBraces() ("\n"|"\r")* <EOF> | ||
} | ||
|
||
/** Brace matching production. */ | ||
void MatchedBraces() : | ||
{} | ||
{ | ||
"{" [ MatchedBraces() ] "}" | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use a filtered resource for example?
See:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because i normally use gradle and didn't knew it. Going to have a look thx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about simply removing
<version>3.5-SNAPSHOT</version>
as you did above?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove the version the build won't be reproducible and maven will use the latest version available. You need a version (and you should actually use the maven enforcer to always make sure all versions are set).