Discussion on "static" and "dynamic" - right or wrong direction?

Malachi de Ælfweald malachid at gmail.com
Sat Jul 23 02:25:02 UTC 2016


Speaking specifically in regards to the build tool side of things, the most
common phases/scopes/etc are usually compile, runtime/provided, test.
That's by no means the only possibilities - especially with a tool like Ant
or Gradle where you will define your own tasks.  Maven is much better about
convention.  Maybe you only have a specific dependency while instrumenting
or running code coverage.  Maybe you only have it while running annotation
processors.

You basically have two options. 1) You provide hooks and all the build
tools are updated to use the new mechanisms; 2) the build tools all find
workarounds to circumvent what you design.

Malachi

On Jul 22, 2016 4:59 PM, "Paul Benedict" <pbenedict at apache.org> wrote:

> The one thought that keeps coming back to me is that "static" and "dynamic"
> bring Jigsaw into an area it was trying to get out of originally: build
> management. In my testing and the re-reading of what's been published,
> clearly these two things called "phases" represent what build management
> tools have. Maven calls these "scopes". So the question for the community
> here is, "is this the right direction?" Because now we're getting
> functionality built around phases/scopes (i.e., concealing a package at
> compile time but exporting it at runtime).
>
> The danger I see with this direction is that it smacks right up against the
> domain that build management tools have solved. Maven has many more
> scopes/phases than Jigsaw, and so why try to enter into this arena? Again,
> Jigsaw was trying to get out of this game. I don't think we should let the
> class file begin to attach phases to the language.
>
> I don't think Jigsaw is getting deep testing by common users, but once they
> do, I am sure more advanced cases will come up. I can see developers
> wanting to conceal/export packages for the sake of testing but not for the
> actual (production) runtime environment. I've written before here that it's
> not beyond the realm of imagination that other phases will begin being
> asked for -- and they should. Professional build tools have more phases
> than these two. So I see Jigsaw opening the door here where it shouldn't.
>
> Perhaps inside of javac/java dictating this kind of stuff, hooks should be
> provided so the environment and/or the module itself can give input. I
> don't have a concrete solution to offer just yet, but I want to start a
> discussion because I don't think introducing "phases" to the language is in
> the right direction. I'd like to discuss alternate approaches with anyone
> interested in this topic.
>
> Cheers,
> Paul
>


More information about the jigsaw-dev mailing list