question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues using Picocli as source file directly in project

See original GitHub issue

I tried to copy Picocli directly in my project (for testing of a modification) but I had to include more than the CommandLine.java file :

  • The CommandLine makes references to AutoComplete in comments like {@link AutoComplete} which produces errors on my IDE and CI.
  • Picocli breaks rules on my Gradle build checks like the use of raw types [rawtypes] found raw type or redundant casts [cast] redundant cast to T and warnings are treated as errors in our checks…
  • I have a strange
error: cannot find symbol
                        ? Range.valueOf("" + ((MethodParam) member.accessible).position)
                                               ^
  symbol:   class MethodParam
  location: class Range
  • My coding conventions are set to Google code style, and it reformats the code of the Picocli in a way that I can’t even think of merging my modifications back to Picocli original project.
  • we have to create a picocli package or change packages in CommandLine file -> changing all imports.

So I did my modifications in the Picocli project (my clone) and built the JAR to include in my other project. I then asked myself, why as Picocli is intended to be used directly as a single source file ? What have I missed ? Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
remkopcommented, Sep 6, 2018

I believe I also fixed this error you reported. MethodParam is now a package protected inner class of Model instead of a private inner class of Model.

error: cannot find symbol
                        ? Range.valueOf("" + ((MethodParam) member.accessible).position)
                                               ^
1reaction
remkopcommented, Sep 5, 2018

I removed the {@link AutoComplete} from the javadoc, and fixed compile warnings “use of raw types [rawtypes] found” and “[cast] redundant cast to T” in master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

picocli - a mighty tiny command line interface
To include as source, get the source code from the GitHub file. Copy and paste it into a file called CommandLine.java , add...
Read more >
Quick Guide - Picocli
Picocli is a one-file framework for creating Java command line ... The content below shows the source code of the ASCIIArt example, ...
Read more >
a mighty tiny command line interface - picocli
Picocli is a one-file Java framework for parsing command line arguments and generating polished, easily tailored usage help messages. With ...
Read more >
a mighty tiny command line interface - picocli
Picocli is a one-file framework for creating Java command line applications with almost zero code. Supports a variety of command line syntax ...
Read more >
a mighty tiny command line interface - picocli
Picocli is a one-file framework for creating Java command line ... file, to encourage application authors to include it in source form.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found