Giter VIP home page Giter VIP logo

ply's People

Contributors

blangel avatar blangelhbo avatar bpollack avatar dmacvicar avatar

Stargazers

 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

ply's Issues

Error when building on windows

Hey guys, I am getting Error: Could not find or load main class net.ocheyedan.ply.JvmPrimer when trying to build the dash labs dynamodb fork. Wondering if this is something wrong on my part or a bug. Id really like to get the project built.

[ply] building dynamodb-geo, 1.1.0 and its submodules:
[ply] geo-core
[ply] s3-geo
[ply]
[ply] building dynamodb-geo itself before its submodules
[clean] Error: Could not find or load main class net.ocheyedan.ply.JvmPrimer
[err!] script ply-clean-1.0.jar failed [ exit code = 1 ].

An improved build description?

This is not an issue, but I wanted to open a discussion and did not find a better place.

I like the simplicity of the model ply uses: the concept of scopes, scripts, etc.

however, property files are not that nice to read and work with.

Hashicop invented HCL (inspired by ucl) in order to provide a language that was good for both humans and machines.

Typesafe Config is an implementation for Java for a similar idea. Keeping the underlaying model the same, the build configuration could look, in a single file like:

project {
  version=1.0
  name=ply-compiler
  namespace=ply-compiler
}

compiler {
  java.source=1.6
  java.target=1.6
}

dependencies {
  "ply-util:ply-util" = 1.0.5
}

dependencies.test {
  // #Fri Oct 21 17:20:55 EDT 2011
  "junit:junit" = 4.10
}

manifest {
  mainClass=net.ocheyedan.ply.script.CompilerScript
}

Also provides some flexibility (which makes it very human friendly), like:

manifest.mainClass=net.ocheyedan.ply.script.CompilerScript
project.version=1.0
project.name=ply-compiler
project.namespace=ply-compiler

in this language can be writen with dot notation or:

manifest {
  mainClass=net.ocheyedan.ply.script.CompilerScript
}

project {
  version=1.0
  name=ply-compiler
  namespace=ply-compiler
}

But you get all the features and testability of a single library that has no dependencies, which at the same time it is also a super-set of properties.

Features of this HOCON language:

  • Comments, with # or //
  • Allow omitting the {} around a root object
  • Allow = as a synonym for :
  • Allow omitting the = or : before a { so
    foo { a : 42 }
  • Allow omitting commas as long as there's a newline
  • Allow trailing commas after last element in objects and arrays
  • Allow unquoted strings for keys and values
  • Unquoted keys can use dot-notation for nested objects,
    foo.bar=42 means foo { bar : 42 }
  • Duplicate keys are allowed; later values override earlier,
    except for object-valued keys where the two objects are merged
    recursively
  • include feature merges root object in another file into
    current object, so foo { include "bar.json" } merges keys in
    bar.json into the object foo
  • include with no file extension includes any of .conf,
    .json, .properties
  • you can include files, URLs, or classpath resources; use
    include url("http://example.com") or file() or
    classpath() syntax to force the type, or use just include "whatever" to have the library do what you probably mean
    (Note: url()/file()/classpath() syntax is not supported
    in Play/Akka 2.0, only in later releases.)
  • substitutions foo : ${a.b} sets key foo to the same value
    as the b field in the a object
  • substitutions concatenate into unquoted strings, foo : the quick ${colors.fox} jumped
  • substitutions fall back to environment variables if they don't
    resolve in the config itself, so ${HOME} would work as you
    expect. Also, most configs have system properties merged in so
    you could use ${user.home}.
  • substitutions normally cause an error if unresolved, but
    there is a syntax ${?a.b} to permit them to be missing.
  • += syntax to append elements to arrays, path += "/bin"
  • multi-line strings with triple quotes as in Python or Scala

I am very interested in trying this. I am not sure if you would think about accepting it upstream giving that the property files are kind of "core" to the current design, but I also understand the important part is keeping the simplicity, so I would like to have a discussion before I start to try to implement it.

I believe that:

  • A nicer build description
  • The ability to bootstrap on Linux without bringing maven in any dependency
  • Some extra sugar on Linux like good offline support and building against system jars
  • Some extra maven compatibility (eg, a script to build simple maven projects)

Could make it a serious player, especially in Linux distributions where maven is pure pain.

Error trying to add Dropwizard dependency

This may admittedly be an error with Dropwizard or its dependencies itself, but, when I try to ply dep add io.dropwizard:dropwizard-core:0.7.0, the process ultimately terminates with

[dep] [err!] Message: Illegal character in path at index 100: file:///Users/benjamin/.ply_home/repo/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${version.jackson.core}/jackson-module-jaxb-annotations-${version.jackson.core}.jar
[dep] [err!] for file:///Users/benjamin/.ply_home/repo/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${version.jackson.core}/jackson-module-jaxb-annotations-${version.jackson.core}.jar
[dep] [err!] Message: The local path is not valid [ file:///Users/benjamin/.ply_home/repo/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${version.jackson.core}/jackson-module-jaxb-annotations-${version.jackson.core}.jar ]
[dep] [err!] path to missing dependency [ io.dropwizard:dropwizard-core -> io.dropwizard:dropwizard-jersey -> com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider -> com.fasterxml.jackson.module:jackson-module-jaxb-annotations ].
[err!] script ply-dependency-manager-1.0.jar failed [ exit code = 1 ].

This looks to me as if ply is failing to interpolate version identifiers into the transitive Jackson dependencies. Notably, this dependency when using Maven or Gradle works fine.

Path seperator ':' for -Xbootclasspath must be ';' on Windows

Path seperator for the -Xbootclasspath command line parameter to java.exe on Windows need to be ';' and not ':' as is the case for *nix apparently. This is a problem in the *.properties files driving Ply. Note that in the ply.bat runner script the seperator is in fact ';' and that seems to work fine.

Fix is just to alter the *.properties files, replacing ':' with ';' where appropriate.

Config parameter 'localRepo' in file depmngr.properties unusable under Windows

The localRepo property in the file depmngr.properties cannot be set to any directory under Windows. Using relative, absolute or paths made up of the parameters such as ${PLY_HOME}\some\dir all does not work because internally the path gets expanded and Java thinks the ':' after the drive letter signifies a protocol it does not know. Have also tried the file type URI to no effect. Very hard to fix because Ply is built using itself! :-) Catch 22 - Ply needs a fix for Windows, to compile the fix you need Ply.

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.