Code Monkey home page Code Monkey logo

java-flagz's People

Contributors

improbable-dino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

java-flagz's Issues

Make travis run etcd integration tests

Currently SBT runs Junit integration tests with --exclude-categories=org.flagz.IntegrationTestCategory by default.

That's to make sure that integration tests are easy to consume by contributors (not needing etcd running)
Figure out a way to pass that Junit runner parameter to sbt test so that it can be set in .travis.yml.

Add a before_script similar to https://github.com/skynetservices/skydns/blob/master/.travis.yml to download a set release of etcd and test against that.

Move to bazel

SBT is pretty terrible, and the main focus of this library is Java folks.

Move to bazel, since it supports both Java and Scala... and I generally understand what that things is doing.

scanAndBind appears to be failing to find any flags

Test class:

public class FlagTest
{
    @FlagInfo(name="debug", altName="d", help="Enable debug logging")
    private static final Flag<Boolean> debug = Flagz.valueOf(false);

    public static void main(String ... args)
    {
        Arrays.stream(args).forEach(arg -> System.out.format("ARG FOUND: %s\n", arg));

        FlagFieldRegistry registry = Flagz.parse(args);
        if(debug.get()) {
            System.out.format("Debug logging enabled...\n");
        }
    }
}

Whether I make the debug field private or public, when attempting to run this snippet I get the following error (against 2.1.0):

ARG FOUND: --debug
Exception in thread "main" org.flagz.FlagException$UnknownFlag: Could not find Flag for name/alt-name 'debug'
        at org.flagz.FlagFieldRegistry.parseAll(FlagFieldRegistry.java:56)
        at org.flagz.Flagz.parse(Flagz.java:101)
        at org.flagz.Flagz.parse(Flagz.java:112)
        at org.eoti.sandbox2.flagz.FlagTest.main(FlagTest.java:22)

I have tried with both JDK8 and Jigsaw JDK9.

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.