{"push_id":1685846906,"size":10,"distinct_size":10,"ref":"refs/heads/master","head":"249fe98c6d996c2d4c696887649a97d6290a53cd","before":"69b4fdd69c0c6e32afa59b746be7e1c532602c5f","commits":[{"sha":"08b6a8f1b85310186fa684091cdac6790bbba132","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Transform com.greetings source into a Java module\n\nThis step transforms the existing `com.greetings` source into a Java\nmodule simply by introducing an empty `module-info.java` file at the\nsource directory root.\n\nWith this _module declaration_ file in place and compiled along with the\nrest of the sources, `java` can now be invoked with its new `--module-path`\noption as opposed to the traditional `-classpath` option. Note how the\nmodulepath now need only contain the top-level `bin` output directory,\nwhile the path to the main class (the new `-m` option) needs to be fully\nqualified by both module and package.\n\nWhen this step is run, the output should remain the same as the previous\nstep. Nothing has changed in the program itself; only how the compiled\nartifacts are structured and invoked has changed:\n\n    $ ./step.sh\n    ...\n    Greetings from main!\n\nSee http://openjdk.java.net/projects/jigsaw/quick-start#greetings","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/08b6a8f1b85310186fa684091cdac6790bbba132"},{"sha":"99618a3510c4d90efd753216c6c6fe9205016d55","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Assemble com.greetings into executable modular jar\n\nThis step uses the `jar` tool to assemble our `com.greetings` module\ninto a _modular jar_. Note the use of some of the many new options for\n`jar` in JDK 9, especially `--main-class`. There is no longer any need to\nmanually author an entry in a MANIFEST.MF file (or for a build system to\ndo so on your behalf); this is all taken care of in a first-class\n    fashion when dealing with modular jars.\n\nOnce the modular jar has been created, `jar` is invoked once more, this\ntime with the new `--print-module-descriptor` option, which presents the\nuser with helpful module metadata (some of which will be explored in\nsubsequent steps):\n\n    Name:\n      com.greetings\n    Requires:\n      java.base [ MANDATED ]\n    Main class:\n      com.greetings.Main\n    Conceals:\n      com.greetings\n\nNote also that the invocation of `java` also becomes simpler when\nworking with modular jars. `java` need only know about the directory\nwhere modular jars reside (`lib` in this case), and the name of the\nmodule to be \"run\" (`com.greetings` in this case).\n\nConsole output from the main method should again remain the same, as the\nprogram itself still has not been modified in any way:\n\n    $ ./step.sh\n    ...\n    Greetings from main!\n\nSee http://openjdk.java.net/projects/jigsaw/quick-start#packaging","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/99618a3510c4d90efd753216c6c6fe9205016d55"},{"sha":"9552d0a6250b8b351241a6ac3be3515df9798b7a","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Introduce org.astro module dependency\n\nThis step adds a second module named `org.astro` and updates the\n`com.greetings` module declaration to _require_ a package _exported_ by\nthe `org.astro` module (the exported package is also named `org.astro`).\n\nThe modules are compiled separately. In order for `com.greetings` to\nhave access to the `org.astro` module's contents, the `javac` command is\ngiven a `--module-path` argument where the `org.astro` module and the\ntypes in its exported packages can be resolved.\n\nThe main method in `com.greeting` has been updated as well, printing out\nthe name of a type referenced from the `org.astro` module. The output to\nthe console should now read:\n\n    $ ./step.sh\n    ...\n    Greetings from org.astro's world!\n\nhttp://openjdk.java.net/projects/jigsaw/quick-start#greetingsworld","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/9552d0a6250b8b351241a6ac3be3515df9798b7a"},{"sha":"e17801ae639732b6b9512c2d92aefda22d71a222","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Remove requires statement and fail at compile time\n\nThis step demonstrates what happens when the _requires_ clause is\nomitted from the `com.greetings` module declaration. Upon trying to\nbuild the `com.greetings` module, compilation should fail, because\n`javac` will no longer be able to resolve the `org.astro` package:\n\n    $ ./step.sh\n    ...\n    src/com.greetings/com/greetings/Main.java:6: error:\n        package org.astro does not exist\n            Object name = org.astro.World.name();\n                                   ^\n\nSee http://openjdk.java.net/projects/jigsaw/quick-start#missing","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/e17801ae639732b6b9512c2d92aefda22d71a222"},{"sha":"8611f2031d720bdf337f666f2059cedd51074866","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Remove exports statement and fail at compile time\n\nThis step fixes the previous error by restoring the _requires_ clause in\nmodule `com.greetings`, but introduces an equivalent error by removing\nthe _exports_ clause from the `org.astro` module descriptor. The\nresulting error message should be the same:\n\n    $ ./step.sh\n    ...\n    src/com.greetings/com/greetings/Main.java:6: error:\n        package org.astro does not exist\n            Object name = org.astro.World.name();\n                                   ^\n\nSee http://openjdk.java.net/projects/jigsaw/quick-start#missing","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/8611f2031d720bdf337f666f2059cedd51074866"},{"sha":"ac2d8ff9ee11e0733c9d42f5da5e6db227076c9f","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Revert introduction of the org.astro module\n\nThis change removes the `org.astro` module in order to make way for the\nintroduction of the `com.socket` SPI module and `org.fastsocket` service\nprovider module in subsequent commits. There is nothing new of interest\nwith regard to Jigsaw in this commit (so feel free to move on directly\nto the next step), but if it this step is run, console output should\nrevert to the message seen in the steps before `org.astro` was first\nintroduced:\n\n    $ ./step.sh\n    ...\n    Greetings from main!","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/ac2d8ff9ee11e0733c9d42f5da5e6db227076c9f"},{"sha":"751d06479f047cc029e21214d598352c241d677f","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Introduce SPI without provider and fail at runtime\n\nServices allow for loose coupling between _service consumer_ modules and\n_service provider_ modules.\n\nThis step introduces a service consumer module, but does not yet\nintroduce a matching service provider:\n\n - module `com.socket` exports an API for network sockets. The API is in\n   package `com.socket` so this package is exported. The API is\n   pluggable to allow for alternative implementations. The service type\n   is class `com.socket.spi.NetworkSocketProvider` in the same module\n   and thus package `com.socket.spi` is also exported.\n\nThe `com.greetings` main class has been updated to load an instance of a\n`com.socket.NetworkSocket` service, but because there is no provider,\nthe following error should be output to the console:\n\n    $ ./step.sh\n    ...\n    Exception in thread \"main\" [...]: No service providers found!\n      at com.socket.NetworkSocket.open(com.socket@/NetworkSocket.java:17)\n      at com.greetings.Main.main(com.greetings@/Main.java:8)\n\nNote how the stack trace above differs slightly from what has been seen\nin previous Java versions. Each call in the trace is now qualified not\nonly by package, class and line number, but also by module. A _module\nversion_ can follow the '@' symbol seen above, but neither `com.socket`\nnor `com.greetings` have been assigned module version metadata, so this\nvalue remains empty.\n\nSee http://openjdk.java.net/projects/jigsaw/quick-start#services","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/751d06479f047cc029e21214d598352c241d677f"},{"sha":"0f6d494ac8a303995506b1205dd337b3bb97e22d","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Introduce service provider and bind successfully\n\nThis step introduces module `org.fastsocket` as a service provider for\nthe `com.socket.spi.NetworkSocketProvider` interface. It does not export\nany packages.\n\nWith this service provider module in place, the `com.greetings` main\nmethod should now be able to load and use an implementation of\n`com.socket.NetworkSocket` and the output to the console should read as\nfollows:\n\n    $ ./step.sh\n    ...\n    Greetings from class org.fastsocket.FastNetworkSocket!\n\nSee http://openjdk.java.net/projects/jigsaw/quick-start#services","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/0f6d494ac8a303995506b1205dd337b3bb97e22d"},{"sha":"6f45be908edc51b2a9bb76b766ade6937271a470","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Add README","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/6f45be908edc51b2a9bb76b766ade6937271a470"},{"sha":"249fe98c6d996c2d4c696887649a97d6290a53cd","author":{"name":"Chris Beams","email":"4181b934c2715a2bba60cdb3cc1b35b2777d1c23@gradle.com"},"message":"Upgrade to JDK 9 early access build 111\n\nAll steps have been updated to reflect minor changes in `jar` options\n(using `--file` vs `--archive`), and README has been updated to reflect\nnew `java -version` output.\n\nNote that the previous set of commits/steps consistent with ea build 81 have\nbeen preserved by pushing them to branch `master-b81`.\n\nFixes #1","distinct":true,"url":"https://api.github.com/repos/cbeams/jigsaw-quick-start/commits/249fe98c6d996c2d4c696887649a97d6290a53cd"}]}
{"actor":{"display_login":"cbeams"}}