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

Paul Benedict pbenedict at apache.org
Fri Jul 22 23:58:59 UTC 2016


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