Coder Social home page Coder Social logo

Comments (4)

mfuerstenau avatar mfuerstenau commented on June 6, 2024

Can confirm. I have no subcommand defined but I encounter this issue in Windows and Linux. Maven 3.8.4, picocli 4.7.5. Main class entry is present but Mixin class entry is missing. Manually adding it fixed the issue.

@itzg You wrote "when it works", did it on occasion work for you?

from picocli.

remkop avatar remkop commented on June 6, 2024

Can confirm. I have no subcommand defined but I encounter this issue in Windows and Linux. Maven 3.8.4, picocli 4.7.5. Main class entry is present but Mixin class entry is missing. Manually adding it fixed the issue.

@itzg You wrote "when it works", did it on occasion work for you?

Thank you both for raising this!

@mfuerstenau you mentioned that you are able to reproduce the issue in a top-level command without subcommands; can you provide more details to help me reproduce the issue? (How many options, does the command have positional parameters, other mixins, ...)

from picocli.

itzg avatar itzg commented on June 6, 2024

@itzg You wrote "when it works", did it on occasion work for you?

@mfuerstenau I just meant when there is only one option field declared then the mixin class got auto-discovered and captured in the reflect json. When there were two options, it didn't.

from picocli.

itzg avatar itzg commented on June 6, 2024

I found what is causing my issue: the second option in my command class is named "version", which overlaps with the standard help options. At this point the mixin is not added to the outer ComandSpec:

https://github.com/remkop/picocli/blob/6dfd688da3001d5dd865f42288e58dfe32b82765/src/main/java/picocli/CommandLine.java#L7387-L7393

This now seems a self-inflicted issue, so I'm good with closing this issue if it seems like outcome matches expectations.

from picocli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.