Git Product home page Git Product logo

modulescanner's Introduction

modulescanner's People

Contributors

sormuras avatar karianna avatar dependabot[bot] avatar

Stargazers

Tomer Figenblat avatar Suresh avatar Mark Reinhold avatar Jonathan Bluett-Duncan avatar  avatar

Watchers

Sander Mak avatar  avatar James Cloos avatar

modulescanner's Issues

explicit mode?

Being able pass a list of files to scan will be very helpful for doing scans, both for scanning the deltas of new releases to Central, and for breaking the initial baseline scan up into several smaller more reasonable scans.

Cleanup output of jdeps so it is easier to parse

Currently the output is a concatenation of the verbatim lines in jdeps:

sun.misc.Resource Removed. See http://openjdk.java.net/jeps/260 + sun.misc.URLClassPath Removed. See http://openjdk.java.net/jeps/260 + sun.misc.Unsafe See http://openjdk.java.net/jeps/260

It's easier to process/analyze when only the classnames are left. I'm partial to also preserving the replacement that's suggested.

Result reported where automatic module appears to have dependencies

After initial runs by Sonatype, some JARs are reported as automatic modules, but also have moduleDepencies listed. That's not possible, an automatic module doesn't have an explicit module descriptor and therefore can't have explicit dependencies.

Some examples of JARs that exhibit this behavior: com.hack23.cia:service.api:2018.8.17 and javax.measure:unit-api:2.0-EDR

Modular JAR files created with recent JDK

  • Does the scanner support JAR files created with JDK 14 or newer?
  • Does it only depend on the JRE that is used to run the scanner on?
  • If yes, on which Java version does the scanner run "at Maven Central"?

Enhance ModuleInspector to record module's API

List, in case of an explicit module, all exported package names.

Quote from Alex Buckley:

๐Ÿ“€ Java module
Name: org.ow2.asm.foobar
API: 2 packages (org.ow2.stuff, org.ow2.morestuff) [show them! they're listed in exports. commitment!]

๐Ÿ’ฟ Automatic Java module
Name: foo.bar.quux (derived from JAR manifest)
API: 9 packages (derived from JAR content, may not be stable) [don't show them, they're not stable!]

โšช Automatic Java module
Name: foo.bar.awesome (derived from JAR filename, may not be stable)
API: 10 packages (derived from JAR content, may not be stable) [don't show them, they're not stable!] (edited)

Giving a flavor of the API is important. It's what distinguishes a Java module from all the components supported by build systems on the right hand side.

Filter for explicit modules is too broad

// Get the module descriptor (module-info for explicit modules) if there is one
private Optional<ModuleDescriptor> getModuleDescriptor() {
return jarFile.stream()
.filter(entry -> entry.getName().contains("module-info"))
.findFirst()
.map(entry -> {
try {
return ModuleDescriptor.read(jarFile.getInputStream(entry));
} catch (IOException ioe) {
LOGGER.error("Failed to get the module-info descriptor", ioe);
// TODO Not sure we want to throw a RuntimeException here
throw new RuntimeException(ioe);
}
});
}

There are artifacts that contain copies module-info.class files from other artifacts. Two examples:

invoking CSV mode

I have tried various version of the following and cant seem to get the csv generation to work.

mvn exec:java -Dexec.mainClass="org.adoptopenjdk.modulescanner.Main" -Dexec.args="src/test/resources/test-maven-repo 20170101000000 /home/maven/test.csv

Is the CSV mode suppose to be working in the current version of the source? If so what is the correct way to invoke it?

Detect false positives

Initial scan results show several JARs that are either classified as automatic module or explicit module, because they shade another JARs that has a module-info.class descriptor or MANIFEST.MF file. These should ideally not be counted as automatic or explicit modules. Even better, this situation should be flagged so that library maintainers can resolve this, because this will break their library on the module path.

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.