mwitkow / java-flagz Goto Github PK
View Code? Open in Web Editor NEWDynamic flag field library for JVM languages.
License: MIT License
Dynamic flag field library for JVM languages.
License: MIT License
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.
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.
Setting up publishing to Maven Central proved to be a hassle.
I used Github RAW serving to set up something similar to:
http://kwebble.com/blog/2014/02/19/use-github-to-host-your-own-maven-repo
This ticket tracks moving to upstream Sonatype repos/Maven Central.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.