Skip to content

Conversation

@regisd
Copy link
Owner

@regisd regisd commented Sep 14, 2018

No description provided.

For instance

bazel run //cup:cup_bin < cup/sample-project/src/main/cup/calculator.cup
This allows:
bazel build cup/sample-project:gen_java

We don't need the cup-maven-plugin anymore
Reorganize classes to avoid circular deps

TODO: Generate LexScan from .flex file (bootstrap)
TODO: yypushStream cannot find symbol
Add skeleton option in jflex() rule
Move GUI in its own package
Don't start GUI if there are no cli args [show usage instead]
Test compiles but fails with StreamClosed
Now failing with org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
      role: org.apache.maven.repository.RepositorySystem
  roleHint:
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
1) No implementation for org.eclipse.aether.RepositorySystem was bound.
  while locating org.apache.maven.artifact.resolver.DefaultArtifactResolver
NoClassDefFoundError: org/eclipse/aether/RepositorySystemSession
	at de.jflex.plugin.maven.JFlexMojoTest.<init>(JFlexMojoTest.java:24)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Missing XmlStreamReadeer
3) testTestResources(de.jflex.plugin.maven.JFlexMojoTest)
java.lang.AssertionError: Test project directory does not exist: /private/var/tmp/_bazel_regisd/7163a9e1c27558e3ee879928afc3313e/sandbox/darwin-sandbox/1/execroot/__main__/bazel-out/darwin-fastbuild/bin/jflex-maven-plugin/src/test/java/de/jflex/plugin/maven/JFlexMojoTest.runfiles/__main__/src/test/projects/single-file-test
	at org.junit.Assert.fail(Assert.java:88)
@regisd regisd force-pushed the bazel branch 2 times, most recently from f2b0cf9 to 505f4f7 Compare September 14, 2018 22:28
The location of the resources inside of the jar file is determined by the project structure. Bazel first looks for Maven's standard directory layout, (a "src" directory followed by a "resources" directory grandchild). If that is not found, Bazel then looks for the topmost directory named "java" or "javatests" (so, for example, if a resource is at <workspace root>/x/java/y/java/z, the path of the resource will be y/java/z. This heuristic cannot be overridden.
function gjf() {
directory=$1
logi "Checking $directory"
java -jar $TOOLSDIR/google-java-format.jar --dry-run --set-exit-if-changed $(find $directory -name '*.java')

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

function gjf() {
directory=$1
logi "Checking $directory"
java -jar $TOOLSDIR/google-java-format.jar --dry-run --set-exit-if-changed $(find $directory -name '*.java')

Choose a reason for hiding this comment

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

Quote this to prevent word splitting.

"$MVN" ${QUIET} -Pfastbuild -pl "$EXTRA_PROJECTS" install
fi

cd "$CWD"

Choose a reason for hiding this comment

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

Use 'cd ... || exit' or 'cd ... || return' in case cd fails.


# TODO(regisd) Define the list of packages via the profile
logi "Build and install JFlex only (-P fastbuild)"
cd "$BASEDIR"

Choose a reason for hiding this comment

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

Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

visibility = ["//visibility:public"],
exports = [
"@com_google_truth_truth//jar",
# TODO(regisd) This should be a runtime_deps

Choose a reason for hiding this comment

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

TODO found

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 12 possible new issues (including those that may have been commented here).
  • 73 fixed issues! 🎉

You can see more details about this review at https://ebertapp.io/github/regisd/jflex/pulls/2.

@@ -0,0 +1,11 @@
# It's not nice when high-level packages are nested inside their dep
# TODO(regisd) Move in a higher level different directory

Choose a reason for hiding this comment

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

TODO found

regisd added a commit that referenced this pull request Oct 22, 2018
# This is the 1st commit message:

Move compile.sh in main repo

# This is the commit message #2:

Download auto-value from mvn central

# This is the commit message #3:

curl -o takes an output file, not dir
@regisd regisd closed this Oct 28, 2018
@regisd regisd deleted the bazel branch November 5, 2019 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants