You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Alexei Zakharov <al...@gmail.com> on 2007/01/06 21:46:33 UTC
[classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Hi all,
I've just finished with moving pack200 code to the new module
(r493560). The name of the new module is "pack200" (no surprises), new
package names start with "org.apache.harmony.pack200". The build can
be customized for using arbitrary build source and build target (Alex
has asked for it). One test is currently failing:
org/apache/harmony/pack200/tests/SegmentTest
so I've put it to the exclude list. I don't know why does it fail,
probably because of the package name change. I suppose Alex can shed
light on it. There are also files that probably need fixing -
META-INF/MANIFEST.MF for example. So patches are welcome as always.
I've seen build failure alerts after my commits - there were problems
with ant clean. After running ant clean twice all problems disappear
on my machine. So..
Thanks for your attention and Merry Christmas to the Orthodox part of
the community,
2006/12/14, Alexei Zakharov <al...@gmail.com>:
> All,
>
> Does anyone have real objections to this Alex's proposal? If no I can
> take care of it.
>
> Thanks,
>
> 2006/12/14, Alex Blewitt <al...@gmail.com>:
> > > Agreed, in general we cannot serialize on waiting for patches to be
> > > committed before moving on, and keeping track of your development can be
> > > a problem in the face of multiple patches and commits etc.
> >
> > Actually, in this case, there is no patch. This is the discussion
> > about moving the pack200 code to a separate module [1], like I've been
> > suggesting from the beginning [2], so that it can be built with a
> > lower Java version (both via the build.xml, the associated Eclipse
> > metadata and the compliance settings for the bundle itself) than the
> > remainder of the archive module. It will also mean that we don't end
> > up with messages being mixed together, which will be more of a problem
> > when it comes to distributing the decoding as a separate bundle
> > externally to Harmony, which was one of my original motiviations in
> > doing this [2]
> >
> > In any case, it doesn't make sense to me to be in-flight doing work
> > whilst the code is in the wrong place (from my point of view, at
> > least). Generating SVN patches after doing a lot of (renaming)
> > refactoring seems to break things, and the only way that the most
> > recent set of code was integrated was by me providing the entire
> > contents of the project that I was working on. If there's directory
> > moves (and/or package names, if it moves to a different module) then
> > it's going to make that process a lot more painful than it already is.
> >
> > I'm sure there's reasons why the general feeling is that it shouldn't
> > be moved out into its own module, but I've not seen a suggestion yet
> > which addresses the issues I've outlined above; though please let me
> > know if I've misunderstood something and it is in fact possible.
> >
> > Unfortunately, I get the feeling we're at an impasse on this, and that
> > in order to achieve my original goal of having an implementation that
> > could be used by other OSGi systems, it would be better to develop
> > this as an entirely standalone OSGi bundle which Harmony could then
> > chose to use if it wanted. This isn't my preferred option, since after
> > all Harmony needs this code, and it's likely to be a better up-stream
> > source for changes in the future, but rather than me trying to
> > repeatedly initiate conversations about why I think it would be better
> > to move it to a separate module, it will likely be easier for me to
> > develop code against a repository which I have write access and an
> > structure it appropriately. Since it too will be licensed under AL,
> > Harmony can then chose to take advantage of it or someone else can
> > continue working on the codebase so far.
> >
> > Alex.
> >
> > [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3C636fd28e0610141654rcd650f8x32c7c2b311a5fd65@mail.gmail.com%3E
> >
> > [2] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200605.mbox/%3c636fd28e0605251346m47a5289ch1e61ce611d0de615@mail.gmail.com%3e
--
Alexei Zakharov,
Intel ESSD
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Yang Paulex <pa...@gmail.com>.
2007/1/8, Peter Donald <pe...@realityforge.org>:
>
> On 1/8/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > > It's not so much the patches being applied fast enough. The problem is
> > > that if I'm adding a new file, and I contribute that, I effectively
> > > can't work on it any more until the file is applied. That's because
> > > when it's subsequently added SVN throws a wobbly and refuses to do
> > > anything because there's a file already there. I'm going to get this
> > > anyway -- solution is to delete and then svn up -- but if I've made
> > > changes to that file (or someone else has made changes that I don't
> > > have) then any further changes get lost. It's less of a problem when
> > > there are already added files there, but most patches I've submitted
> > > have had new files in place, and it does take me a while to sync after
> > > a patch has been applied.
> ...
> > How about svk?
>
> I use SVK to do things like this almost everyday and it works like a
> charm. I even use SVK to do changes on repos I have write access so
> that the granularity of main repo commit is the related to size of the
> feature change. About the only negative with SVK is that it can be a
> PITA to install.
I also had some usage experience with svk, and my feeling is similar, it's
great but a little difficult to install (on Linux).
Another choice it to use SVN's vendor branches feature[1], it has no "smart
merge", but it's easier to setup.
[1] svn documentation, chapter 7, section of "vendor branches"
--
> Cheers,
>
> Peter Donald
>
--
Paulex Yang
China Software Development Labotary
IBM
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Peter Donald <pe...@realityforge.org>.
On 1/9/07, Gregory Shimansky <gs...@gmail.com> wrote:
> This pretty much reminds me of what GIT is capable of doing and how it was
> used internally in Intel. You are building a chain of commits into a local
> repository, then create a patch which includes all changes in this chain. I
> am very curious about one aspect of this practice. If in the main repository
> in SVN some files affected by your chain of commits are changed, how hard it
> is to merge changes from the main latest revision of SVN repository with the
> chain that you've built locally, based on some earlier previous SVN revision?
It is trivial to do this under svk. I actually do the synchronization
with remote repo, merging into local branches and updating working
copys in separate steps but I believe you can do it in one step via
either "svk up -sm" or "svk pull" in a working copy.
--
Cheers,
Peter Donald
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Gregory Shimansky <gs...@gmail.com>.
On Monday 08 January 2007 06:25 Peter Donald wrote:
> On 1/8/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > > I use SVK to do things like this almost everyday and it works like a
> > > charm. I even use SVK to do changes on repos I have write access so
> > > that the granularity of main repo commit is the related to size of the
> > > feature change.
> >
> > I don't understand quite what you mean.
>
> Sometimes when I am working on a feature X. I will work till I get
> partial X working and commit that. Then I will get X working that
> little bit more and commit that etc. Before I used SVK this would
> flood the main SVN repository with these changes. Some of these
> changes would be trivial, some would get backed out and some were just
> points I may want to roll back to. Thus the SVN repos got filled up
> with some "junky" changes.
>
> Now that I use SVK I will incrementally commit to local SVK repo. When
> I complete implementing feature X, and it is fully tested and verified
> then I will push the changes from SVK back into SVN as one large
> commit. This makes the SVN repository much more useful as each change
> is one single consistent semanticlly consistent change - rather than
> feature X being scattered across a set of changes - it all occurs in
> one commit.
This pretty much reminds me of what GIT is capable of doing and how it was
used internally in Intel. You are building a chain of commits into a local
repository, then create a patch which includes all changes in this chain. I
am very curious about one aspect of this practice. If in the main repository
in SVN some files affected by your chain of commits are changed, how hard it
is to merge changes from the main latest revision of SVN repository with the
chain that you've built locally, based on some earlier previous SVN revision?
GIT has a very powerful command rebase (to make the base revision which was
used to create a chain of local commits) and I used to love it. I wonder if
SVK can do the same. If yes, I'm going to try it too.
--
Gregory
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Peter Donald <pe...@realityforge.org>.
On 1/8/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > I use SVK to do things like this almost everyday and it works like a
> > charm. I even use SVK to do changes on repos I have write access so
> > that the granularity of main repo commit is the related to size of the
> > feature change.
>
> I don't understand quite what you mean.
Sometimes when I am working on a feature X. I will work till I get
partial X working and commit that. Then I will get X working that
little bit more and commit that etc. Before I used SVK this would
flood the main SVN repository with these changes. Some of these
changes would be trivial, some would get backed out and some were just
points I may want to roll back to. Thus the SVN repos got filled up
with some "junky" changes.
Now that I use SVK I will incrementally commit to local SVK repo. When
I complete implementing feature X, and it is fully tested and verified
then I will push the changes from SVK back into SVN as one large
commit. This makes the SVN repository much more useful as each change
is one single consistent semanticlly consistent change - rather than
feature X being scattered across a set of changes - it all occurs in
one commit.
> I'm going to give it a whirl. I've been pondering the benefits/
> downsides of a distributed version control system, and maybe this
> will help me get a better perspective.
Some useful isntructions on the work flow I use.
http://jikesrvm.sourceforge.net/wiki/index.php/Get_The_Source#Use_SVK
--
Cheers,
Peter Donald
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Jan 7, 2007, at 9:18 PM, Peter Donald wrote:
> On 1/8/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>> > It's not so much the patches being applied fast enough. The
>> problem is
>> > that if I'm adding a new file, and I contribute that, I effectively
>> > can't work on it any more until the file is applied. That's because
>> > when it's subsequently added SVN throws a wobbly and refuses to do
>> > anything because there's a file already there. I'm going to get
>> this
>> > anyway -- solution is to delete and then svn up -- but if I've made
>> > changes to that file (or someone else has made changes that I don't
>> > have) then any further changes get lost. It's less of a problem
>> when
>> > there are already added files there, but most patches I've
>> submitted
>> > have had new files in place, and it does take me a while to sync
>> after
>> > a patch has been applied.
> ...
>> How about svk?
>
> I use SVK to do things like this almost everyday and it works like a
> charm. I even use SVK to do changes on repos I have write access so
> that the granularity of main repo commit is the related to size of the
> feature change.
I don't understand quite what you mean.
> About the only negative with SVK is that it can be a
> PITA to install.
I'm going to give it a whirl. I've been pondering the benefits/
downsides of a distributed version control system, and maybe this
will help me get a better perspective.
geir
>
> --
> Cheers,
>
> Peter Donald
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Peter Donald <pe...@realityforge.org>.
On 1/8/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > It's not so much the patches being applied fast enough. The problem is
> > that if I'm adding a new file, and I contribute that, I effectively
> > can't work on it any more until the file is applied. That's because
> > when it's subsequently added SVN throws a wobbly and refuses to do
> > anything because there's a file already there. I'm going to get this
> > anyway -- solution is to delete and then svn up -- but if I've made
> > changes to that file (or someone else has made changes that I don't
> > have) then any further changes get lost. It's less of a problem when
> > there are already added files there, but most patches I've submitted
> > have had new files in place, and it does take me a while to sync after
> > a patch has been applied.
...
> How about svk?
I use SVK to do things like this almost everyday and it works like a
charm. I even use SVK to do changes on repos I have write access so
that the granularity of main repo commit is the related to size of the
feature change. About the only negative with SVK is that it can be a
PITA to install.
--
Cheers,
Peter Donald
Re: Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alex Blewitt <al...@gmail.com>.
On 10/01/07, Tim Ellison <t....@gmail.com> wrote:
> The working model for contributing code.
>
> Taking them in reverse order, there have been a number of suggestions
> for working 'disconnected' and contributing patches / new files from
> your local repository (such as svk and git) that I hope you can figure
> out a system that works for you. It is a problem that all contributors
> face, and a great topic for sharing experiences.
Yup. And realistically, I've been frustrated by a few things (like the
fact that binaries aren't included in diffs; we should make that
clearer in the doc) as well as having a tendency to wait until patches
are applied. It mostly seems to be the new files, but it's still
growth rather than patching existing files for the most part now.
Having some kind of intermediary (e.g. the git or whatever previously
discussed) seems like an idea, but ideally I want to get decent
support in the Eclipse IDE as opposed to doing things on the command
line. Subclipse has that support, so there's an argument for staying
with that.
> Additional requirements on the Pack200 code, and
>
> IMO the additional requirements on the Pack200 code seems to
> unnecessarily couple implementation with packaging/deployment needs. I
> don't think making Pack200 a separate bundle will be sufficient to meet
> all the requirements. Let me try and explain why:
>
> - dependency on Java 1.4 syntax and APIs
>
> We can easily ensure that the Pack200 code only uses 1.4 syntax by
> compiling it with the appropriate source flag. However, we cannot
> ensure it only uses 1.4 APIs since we compile Harmony against itself.
> The only way to do that is to have a JSE1.4 class library around, which
> means an additional Harmony dependency.
Whilst you can't depend on those APIs, I can, because I'm writing on a
system which has a JVM 1.4 on it. And it's important to me to make
that happen. The automated build can only check for 1.4 source
compatibility; but that's still important, because I'm compiling
against a 1.4 VM that can't handle 1.5 stuff.
> I suggest that we compile the code in a separate source folder as 1.4,
> but rely upon an out of band build to check that there are no references
> outside the J2SE-1.4 execution environment.
You *have* to have that in the IDE too -- it's not sufficient to have
it in the build. That's what I've set up in the pack200 project (as
per the patch recently submitted).
> If people commit 5.0 syntax, or code that depends upon 5.0 APIs then it
> is not your job to fix it -- you should yell on the dev list and have it
> rolled back.
The point is this can be done inadvertently. *every* *time* I have
submitted a patch, and then updated later, it's been polluted with 5.0
syntax. In the last case -- the package refactoring -- it was because
someone had run a 'Clean Up' on a few source files, and because the
project was set to 5.0 compatibility. That would not have happened --
or been possible -- if the source code was set to 1.4 compatibility.
You *cannot* configure Eclipse to have a project that contains a
source folder for 1.4 and a source folder for 1.5. They must be
separate projects. This is, in effect, what we have now. In fact, I'd
argue that we should have a separate project for the pack200-java5
code; but the chances of me convincing you that I should add another
project (despite being the right thing to do) are slim to
non-existant. So, I've compiled/uploaded a .jar with 1.5, and put it
on the classpath, so that if you're on a 1.5 system you can take
advantage of it. On a 1.4 system they won't load -- but that's OK,
because the interface they implement was only added in 1.5 anyway, so
1.4 users won't use those classes.
The build.xml correctly builds the source files with a 1.4 target (for
the src/main/java) and a 1.5 target (src/main/java5) files each time.
> - packaging as a separate bundle
>
> In regular OSGi you do not explicitly list java.* packages in the
> Import-Package statement. They are part of the execution environment
> hosting the bundle. However, since Harmony is modularizing the class
> libraries themselves we precisely want to define the scope of the bundle
> by java.* and their corresponding implementation packages.
>
> For the Pack200 code to be a useful bundle in Harmony will require a
> different Manifest to a bundle that is useful as a regular Eclipse
> plug-in / Felix bundle / whatever. Harmony's bundles cannot specify a
> required execution environment. One manifest will not do both jobs.
You are incorrect. I have the bundle running in an Eclipse instance right now:
osgi> install file:///tmp/pack200.jar
Bundle id is 244
osgi> start 244
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE system.bundle_3.2.0.v20060510
1 ACTIVE org.eclipse.equinox.common_3.2.0.v20060512
2 ACTIVE org.eclipse.update.configurator_3.2.0.v20060511
:
238 RESOLVED org.tigris.subversion.subclipse_1.0.3
242 RESOLVED org.eclipse.platform.doc.isv_3.2.1.200701082312
244 ACTIVE org.apache.harmony.pack200_1.0.0
This is using the same manifest that's in the code at the moment. All
that's needed is to make the resolution of the Import-Package
optional:
Manifest-Version: 1.0
Specification-Title: Java Platform API Specification
Specification-Version: 1.5
Implementation-Title: Apache Harmony
Implementation-Vendor: The Apache Software Foundation
Implementation-Vendor-Id: org.apache.harmony
Implementation-URL: http://harmony.apache.org
Bundle-ManifestVersion: 2
Bundle-Name: Harmony Pack200
Bundle-SymbolicName: org.apache.harmony.pack200
Bundle-Version: 1.0.0
Bundle-ClassPath: .
Eclipse-JREBundle: true
Import-Package: java.io;resolution:=optional,
java.lang;resolution:=optional,
java.util;resolution:=optional,
java.util.jar;resolution:=optional
Export-Package: org.apache.harmony.pack200,
org.apache.harmony.pack200.bytecode
Bundle-RequiredExecutionEnvironment: J2SE-1.4,
J2SE-1.5
On the proviso that the manifest parsing is following the OSGi syntax
in Harmony correctly, this will perform the correct binding when
present in an environment where those packages are exported; and in
the case where they are not, will work just the same.
Let's be clear: I started this work so that it would be available as a
separate bundle. The pack200 that I've installed is the output of the
build.xml; the intention was always to have the same bundle running in
both Harmony and Equinox (or other OSGi bundles). After all, isn't
this what OSGi bundles/modular architecture is all about?
> I suggest that there needs to be a separate project description and
> Manifest for a 'regular' Pack200 bundle outside the modules source tree,
> that links to the same source folder containing the same implementation
> code. Then there can be a 'Harmony view' and 'regular bundle view' of
> the same code.
They are one and the same, and there appears to be no problems with
this being the case. Perhaps someone on a proper Harmony supported
platform (i.e. not a Mac :-) could verify that the above manifest
works for the pack200 still works when running the tests under
Harmony? If that's the case, I see no reason why we should need a
'Harmony view' and 'regular bundle view' distinction.
> - NLS messages
>
> Sure, if the code is going to be separable, then it needs a way to take
> only it's own messages away. The mechanism for loading messages is
> lightweight so I suggest there is no need to re-invent that code.
Agreed.
> So then, does this warrant a new module, and what is a module anyway?
> Why is 'regex' a module, etc?
>
> The original discovery of modules was driven by the observed coupling in
> the APIs and implementation of the class library code. We split up
> groups of functionally coherent behaviour, and declared them a module.
>
> Later we decided that we would not split along the API's SPI boundaries
> too, so, for example, the LDAP and DNS providers are in the JNDI module,
> and the SHA1, PKCS code are in SECURITY module etc.
Why not? It would have seemed a sensible decision to make. But those
decisions have already been made.
> I see the Pack200 being similar. It is a provider to the ARCHIVE
> module, and by the same reasoning would be part of that module. The
> additional requirements means that I'd ensure it was in a separate
> source folder, and a non-Harmony module project made to deliver that
> code into a regular OSGi bundle for consumption elsewhere.
I've already said that it is not going to work in a single Eclipse
project. The build assumptions are that (a) each module is its own
project, and (b) they're all at the same level. In any case, Eclipse
is not well suited to nested project structures like that.
In any case, what you see and I see are different things. I see the
pack200 implementation as being something that's usable by Java
applications, other OSGi platforms, and Harmony. Polluting/bloating
that with java.util.jar code destroys that view of the world. Perhaps,
since you believed that it's necessary to have two separate bundles
that another target would make sense. Given that it's not necessary,
and that 1 module == 1 bundle and the Harmony Pack200 Bundle == OSGi
Pack200 Bundle, I really don't see the desire to prevent this from
happening because of other decisions made in the past.
> Could we have made a different choice about projects? Sure. We could
> pick finer-grained bundles and pull out all the reusable pieces and
> providers into projects/bundles. I can imagine having at least 3x as
> many modules for Harmony [aside: I've always wanted separate test code
> projects].
I'd argue that this is a good goal to work towards. Indeed, that's
what I'm encouraging for the pack200 module. So why, then, are you
against the idea? Shouldn't this be a goal to aim for for new modules,
and/or look at trying to make it happen for old modules?
> That is how we got to this set of modules and their 'semantic size'.
> Could we, or should we, have done it differently? Maybe, it has worked
> well for us so far in terms of resolving multiple contributions, and
> switching different implementations (was it 3 RMI's at one point?!).
Let's distinguish between 'what was done' with existing projects, and
'what we want to do with pack200'. I made my views known when I
started contributing code, that I wanted it as a separate module, and
that it had to run on 1.4. I'm making that happen. The solution we now
have works, and works well -- the same deployable bundle runs under
Eclipse and (presumably) Harmony too.
OTOH the only reason for moving the pack200 back into the archive
module seems to be historical. The solution won't work -- 1.5 code
will be checked in, as it has repeatedly in the past -- and the
generated code (with java.util.jar stuff in) is extra bloat that's not
required for the general OSGi case (and in fact, may well have
problems). Not only that, but the modules are supposed to be, well,
modular and the finer grain the better. As I've noted, it would make a
whole lotta sense to have another pack200-java5 project rather than
bodging a checked in Jar file in the project.
> But like all parents, you know that if you are asked 'why?' enough times
> then the answer will eventually be 'because!' <g>. If we want to
> revisit this decision then fine, but let's do so consistently for the
> whole project, and not build a patchwork architecture of different local
> decisions.
Right, but it's also important to consider things on a case-by-case
basis rather than relying on dogma.
It's also the case that the SPIs for Harmony (e.g. the JNDI, DNS) are
currently not planned to be reused outside of the Harmony framework.
If they were, perhaps the idea of splitting them out too would make a
lot more sense. However, if they aren't being used then there are less
benefits in doing so.
The fact that one example isn't going to be used outside of Harmony
doesn't imply that another example is also not going to be used
outside of Harmony. Therefore, straitjackets around the one that *is*
going to be used outside of Harmony just because there's one that
isn't is not going to help anyone.
> I've seen good-will on both sides to try and get a workable solution.
> Let's keep talking until we get a satisfactory resolution. And in the
> meantime,keep hacking on the code :-)
There's three outcomes:
1) The code moves back into the archive module, where it was before.
Multiple source folders in one project (with 1.5 compatibility) are
created. People randomly check in 1.5 annotations during automated
Clean Up operations. It no longer works on pre 1.5 systems. Harmony is
happy, but I'm not.
2) The code stays in the pack200 module (either with or without a
separate pack200-jav a project). I'm happy, and the bundle works in
both Harmony and other OSGi systems with no changes. Harmony gets a
pack200 bundle that is integrated with the build and it lives in the
correct upstream project.
3) The code moves off to eclipse.org, where I develop it as an OSGi
bundle, either under EPL or dual EPL+Apache License. I'm happy, but
Harmony is not. Whilst there's no reason you couldn't hook it up as an
external dependency for download and weave it into the build (assuming
AL, of course)
I've argued that the 2) is the middle ground, keeping everyone happy,
and I've gone to great lengths to point out why 1) won't work. And,
other than 'we didn't start doing it that way', I believe that I've
addressed all the points you made.
Realistically, it's not my call to make. I don't think I can make any
more persuasive arguments than I already have done, so the decision is
up to the Harmony community. I'll keep working on the code in the new
pack200 location (assuming that
http://issues.apache.org/jira/browse/HARMONY-2957 gets applied). But
I'd like to get a final answer whether we're going with 1), 2) or 3)
here, because I don't want the code to move under my feet whilst I'm
trying to create patches -- the merge would be a nightmare.
Alex.
Re: [classlib][pack200] new module (was: [classlib][pack200] Development
has stalled :-( )
Posted by Tim Ellison <t....@gmail.com>.
I think it would be helpful to keep the following two issues you have
raised quite separate.
1) Additional requirements on the Pack200 code, and
2) The working model for contributing code.
Taking them in reverse order, there have been a number of suggestions
for working 'disconnected' and contributing patches / new files from
your local repository (such as svk and git) that I hope you can figure
out a system that works for you. It is a problem that all contributors
face, and a great topic for sharing experiences.
IMO the additional requirements on the Pack200 code seems to
unnecessarily couple implementation with packaging/deployment needs. I
don't think making Pack200 a separate bundle will be sufficient to meet
all the requirements. Let me try and explain why:
- dependency on Java 1.4 syntax and APIs
We can easily ensure that the Pack200 code only uses 1.4 syntax by
compiling it with the appropriate source flag. However, we cannot
ensure it only uses 1.4 APIs since we compile Harmony against itself.
The only way to do that is to have a JSE1.4 class library around, which
means an additional Harmony dependency.
I suggest that we compile the code in a separate source folder as 1.4,
but rely upon an out of band build to check that there are no references
outside the J2SE-1.4 execution environment.
If people commit 5.0 syntax, or code that depends upon 5.0 APIs then it
is not your job to fix it -- you should yell on the dev list and have it
rolled back.
- packaging as a separate bundle
In regular OSGi you do not explicitly list java.* packages in the
Import-Package statement. They are part of the execution environment
hosting the bundle. However, since Harmony is modularizing the class
libraries themselves we precisely want to define the scope of the bundle
by java.* and their corresponding implementation packages.
For the Pack200 code to be a useful bundle in Harmony will require a
different Manifest to a bundle that is useful as a regular Eclipse
plug-in / Felix bundle / whatever. Harmony's bundles cannot specify a
required execution environment. One manifest will not do both jobs.
I suggest that there needs to be a separate project description and
Manifest for a 'regular' Pack200 bundle outside the modules source tree,
that links to the same source folder containing the same implementation
code. Then there can be a 'Harmony view' and 'regular bundle view' of
the same code.
- NLS messages
Sure, if the code is going to be separable, then it needs a way to take
only it's own messages away. The mechanism for loading messages is
lightweight so I suggest there is no need to re-invent that code.
So then, does this warrant a new module, and what is a module anyway?
Why is 'regex' a module, etc?
The original discovery of modules was driven by the observed coupling in
the APIs and implementation of the class library code. We split up
groups of functionally coherent behaviour, and declared them a module.
Later we decided that we would not split along the API's SPI boundaries
too, so, for example, the LDAP and DNS providers are in the JNDI module,
and the SHA1, PKCS code are in SECURITY module etc.
I see the Pack200 being similar. It is a provider to the ARCHIVE
module, and by the same reasoning would be part of that module. The
additional requirements means that I'd ensure it was in a separate
source folder, and a non-Harmony module project made to deliver that
code into a regular OSGi bundle for consumption elsewhere.
Could we have made a different choice about projects? Sure. We could
pick finer-grained bundles and pull out all the reusable pieces and
providers into projects/bundles. I can imagine having at least 3x as
many modules for Harmony [aside: I've always wanted separate test code
projects].
That is how we got to this set of modules and their 'semantic size'.
Could we, or should we, have done it differently? Maybe, it has worked
well for us so far in terms of resolving multiple contributions, and
switching different implementations (was it 3 RMI's at one point?!).
But like all parents, you know that if you are asked 'why?' enough times
then the answer will eventually be 'because!' <g>. If we want to
revisit this decision then fine, but let's do so consistently for the
whole project, and not build a patchwork architecture of different local
decisions.
I've seen good-will on both sides to try and get a workable solution.
Let's keep talking until we get a satisfactory resolution. And in the
meantime,keep hacking on the code :-)
Regards,
Tim
Re: Re: Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alex Blewitt <al...@gmail.com>.
On 09/01/07, Alexei Zakharov <al...@gmail.com> wrote:
>
> On the other hand, I still don't understand how this solves the SVN
> problem described by Alex. I've missed something probably.
I don't think it will solve all of the SVN issues that I've been
having, but it certainly makes it easier to separate out the pack200
code from the non-pack200-archive code, which makes it easier for
generating/exporting as a bundle. Plus, since I'm working on this in
isolation of the remainder of the class libraries (I'm developing on a
Mac, where I'm using the Apple JVM for the public libraries) makes it
easier.
> Another thing I can't really get why we keep pack200 in the classlib workspace
> if, as Alex has said, it has no relations (should not have relations?)
> to the rest of classlibrary code and does not implement any public
> API. May be jdktools is a better candidate indeed?
All of the pack code is its own, except for two implementations of
java.util.jar.Pack200.Packer and java.util.jar.Pack200.Unpacker
interfaces, which are (and should be) in the archive module. There's a
Pack200 factory that instantiates the appropriate library with the
equivalent of Class.forName(System.getProperty("java.util.jar.Pack200.Packer","org.apache.pack200.Pack200Adapter")),
which the harmony libraries default to the org.apache.pack200
implementation if it's not set.
So the code is pretty independent of the Java classlibs; however, the
implementation must be there at run time if it is to pass the TCK.
> And again about this SVN issue. We may establish some process
> probably. For example Alex can add a comment to critical JIRAs that he
> can't live without this JIRA is applied. I did something like it
> during my pre-committer life while working on the beans module.
> Another suggestion is to post small JIRAs if some files should be
> added to the workspace. It is easy to integrate and should simplify
> Alex's life.
Mostly, I'm easy -- the process was working, but I had a few problems
generating the patches with new files that was mostly resolved by just
dumping a Zip of the workspace up. The only other problem was that if
there had been a lot of work, especially containing new files, it is
easier to batch up the changes and then wait for them to be applied;
but to be honest, it wasn't that much of a show stopper since I have
other things to do anyway. The only reason why I've not done anything
since my last work in November was because I didn't see much point in
having potentially unappliable fixes if the module (and therefore the
package name) was going to change in every file. Now that that's done,
I can pick up speed again.
Alex.
Re: Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alex Blewitt <al...@gmail.com>.
On 10/01/07, Tim Ellison <t....@gmail.com> wrote:
> I bet patches to the website source work really well; hint, hint. :-)
>
> Agreed that documenting the preferred way to send such changes would be
> good.
https://issues.apache.org/jira/browse/HARMONY-2966
Alex.
Re: [classlib][pack200] new module (was: [classlib][pack200] Development
has stalled :-( )
Posted by Tim Ellison <t....@gmail.com>.
Alex Blewitt wrote:
> BTW I think that the page describing how to generate diffs needs to
> explain that it seems to fail spectacularly for binary files, and that
> if you've got a binary file (either new or modified) then you need to
> include it separately.
>
> The key phrase to look out for in the diff itself is:
> "Cannot display: file marked as a binary type."
>
> If that's got an entry, it means you need to manually add the binary file.
I bet patches to the website source work really well; hint, hint. :-)
Agreed that documenting the preferred way to send such changes would be
good.
Regards,
Tim
Re: Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alex Blewitt <al...@gmail.com>.
On 10/01/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
> > And again about this SVN issue. We may establish some process
> > probably. For example Alex can add a comment to critical JIRAs that he
> > can't live without this JIRA is applied. I did something like it
> > during my pre-committer life while working on the beans module.
> > Another suggestion is to post small JIRAs if some files should be
> > added to the workspace. It is easy to integrate and should simplify
> > Alex's life.
>
> Along with the good idea of smaller JIRAs, I can suggest two things
> to help :
>
> 1) That we make a better effort to get the patches in
>
> 2) That Alex also call attention to the work on the dev list
Works for me :-)
BTW I think that the page describing how to generate diffs needs to
explain that it seems to fail spectacularly for binary files, and that
if you've got a binary file (either new or modified) then you need to
include it separately.
The key phrase to look out for in the diff itself is:
"Cannot display: file marked as a binary type."
If that's got an entry, it means you need to manually add the binary file.
Alex.
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Jan 9, 2007, at 11:02 AM, Alexei Zakharov wrote:
> As for me, I don't really care if we have a new module or not. I did
> this just to make Alex happy and because I didn't hear any objections.
> Just a New Year exercises. I can roll it back if we decide that it
> will be better for us to live without it.
Don't worry - you didn't do anything wrong. To me, this is somewhat
of a complicated issue, and combined with the end-of-year vacation/
burnout/work_requirements/<you name it>, we're here.
I'm confident we'll work this out.
> And again about this SVN issue. We may establish some process
> probably. For example Alex can add a comment to critical JIRAs that he
> can't live without this JIRA is applied. I did something like it
> during my pre-committer life while working on the beans module.
> Another suggestion is to post small JIRAs if some files should be
> added to the workspace. It is easy to integrate and should simplify
> Alex's life.
Along with the good idea of smaller JIRAs, I can suggest two things
to help :
1) That we make a better effort to get the patches in
2) That Alex also call attention to the work on the dev list
geir
Re: Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alexei Zakharov <al...@gmail.com>.
As for me, I don't really care if we have a new module or not. I did
this just to make Alex happy and because I didn't hear any objections.
Just a New Year exercises. I can roll it back if we decide that it
will be better for us to live without it. At the same time I don't
think that having the pack200 code in a separate module is something
more illogical than having annotation in the separate module (total
code size is about 16K) or having nio and nio_char separated.
On the other hand, I still don't understand how this solves the SVN
problem described by Alex. I've missed something probably. Another
thing I can't really get why we keep pack200 in the classlib workspace
if, as Alex has said, it has no relations (should not have relations?)
to the rest of classlibrary code and does not implement any public
API. May be jdktools is a better candidate indeed?
And again about this SVN issue. We may establish some process
probably. For example Alex can add a comment to critical JIRAs that he
can't live without this JIRA is applied. I did something like it
during my pre-committer life while working on the beans module.
Another suggestion is to post small JIRAs if some files should be
added to the workspace. It is easy to integrate and should simplify
Alex's life.
Regards,
2007/1/9, Alex Blewitt <al...@gmail.com>:
> On 07/01/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > >> 2) not being able to keep the code at Java 1.4 for portabliity
> > >> -> 2) This I think we can handle easily - can we add a small CC
> > >> target
> > >> that simply compiles this package as 1.4 code? While it doesn't
> > >> prevent someone from making an inappropriate change, it does ensure
> > >> that if it is changed, it's identified and reversed quickly.
> > >
> > > That doesn't help for people who try to genericise the code, for
> > > example.
> >
> > Why? it wouldn't compile.
>
> You need this to be in the IDE, and not just in the build target. For
> example, at some point between when I last did any work on this
> (mid-November) and the reorg of the modules, various annotations were
> added (which are now compile time errors in my workspace, because I
> have it set to 1.4 compatibility) as well as generics:
>
> http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java?revision=493560&view=markup
>
> http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200Adapter.java?revision=493560&view=markup
>
> These were likely not added intentionally -- the source code is
> plastered with comments like 'Dont add generics or annotations' at the
> top -- but when loaded as a project in Eclipse, you can do automated
> 'clean-up' of source files, including the ability to automatically add
> cancer like this into a codebase. And because it doesn't show up in
> the IDE, you might then continue to do a bunch of work before
> committing.
>
> Even if you have the build to compile with -target 1.4, you'll still
> potentially end up with a lot of manual work to undo the automated
> clean-up.
>
> On the other hand, as a separate project, with separate manifests,
> source files, and compiler settings, you can set up the project so
> that it compiles against 1.4, and therefore without adding this kind
> of stuff in.
>
> I've spent a good 15 minutes going through the code and undoing these
> automated clean-ups just so that it compiles again on a 1.4 system. I
> really, really don't want to have to do it again.
>
> > > Plus, the manifest should list J2SE-1.4 as its requirements,
> > > and not J2SE-1.5 (or J2SE-5 or whatever it is).
> >
> > That's only because there's one manifest at the moment - there's no
> > reason why there can't be other build targets, and therefore other
> > manifests.
>
> At what point are you just including one project inside another
> project for the sake of it?
>
> > Right - so how do we do this so that there's the appropriate maifest
> > for you?
> >
> > Lets try this - what does the manifest look like?
>
> It'll be a standard OSGi manifest. I'm working on the update to the
> project's manifest now, and will commit a patch shortly.
>
> > > Or, just have a separate module. Plus, if there's going to be a
> > > separate bundle generated, why not use the fact that one module is a
> > > bundle? Why go to all the trouble of setting up a build library that
> > > has this separation and then try and force two bundles to live in one
> > > module?
> >
> > Because I think that our notion of module was defined with
> > architectural boundaries for the classlibrary, not issues like this.
> > So I'm against it being a classlib module.
>
> Isn't this just a more verbose way of saying 'because'? After all,
> there's a 'regexp' module separate from the other java.util code; as
> is the archive module, too. Perhaps you could explain why it's OK to
> have 'regexp' as a separate module, but not pack200? After all, regexp
> is just a part of java.util; as for that matter is the java.util.jar
> code.
>
> > It may make sense as a jkdtools module for which the classlib has a
> > dependency - that's not that much better, but it's an improvement.
>
> There's a distinction between the pack200 executable (which I've not
> started work on) and the actual bundle implementing the algorithm.
> It's very likely that if this is to be shared elsewhere, it will be
> via the bundle and the code, as opposed to the command line (since its
> main goal is to be used in programs outside of Harmony).
>
> > > Well, I've also made the point about messages and internationalisation
> > > thereof. The goal is for this to be separately downloadable outside of
> > > the Harmony APIs; therefore, mixing up messages designed for this
> > > bundle with messages in the generic Java util library.
> >
> > Ah - yes. I remember that and meant to say something about it in my
> > last message (today is my last day of vacation and I'm distracted...)
> >
> > Yes, there should be separate messages.
>
> The problem is that the guidelines state that there's one messages
> bundle per module. Ergo, following those guidelines will lead to
> message intermixing. In addition, I've already raised the issue about
> how to deal with the accidental inclusion with the Harmony core NLS
> code. Ideally, I'd want it to be in a separate project that doesn't
> have any dependencies on the core Harmony code, so that this can't be
> added accidentally as has been done already.
>
> > > The same also goes for the Apache NLS classes. The Pack200 stuff can't
> > > rely on that for internationalisation without dragging extra baggage
> > > with it. This has already been applied once to the strings in the
> > > pack200 code, and I had to manually undo it.
> >
> > Sure - the key here is to respect these boundaries and you shouldn't
> > have to undo - you should squawk and someone who made the change
> > should fix it.
>
> It happened again with the code clean-up. It will keep happening if
> it's in a project that is defined to use 1.5 defaults. The only way to
> prevent it happening is to move it out into a separate project that
> only uses 1.4 code.
>
> > > out into a separate module is a bad idea. There seems to be resistance
> > > for resistance's sake ("No, let's try and find a way to keep it the
> > > same") as opposed to a justification ("We shouldn't do that because
> > > ...").
> >
> > Because our module structure is organized around well-thought-out
> > boundaries for a classlibrary for java SE 5, not because of a
> > developers issues w/ SVN or our message bundle system or any of the
> > other reasons.
>
> That's just a longer form of 'because'. Why should regexp and archive
> be in separate modules, when they could be in the same util module?
> And given any answer for that, why should the answer be any different
> for code that is in 'java.util.jar' be in the same module as
> 'org.harmony.pack200'? In short, why does this conflict with the
> 'well-thought-out-boundaries'? Heck, the pack200 stuff is *supposed*
> to be modular; it's supposed to be swapped out for any other
> implementation of pack200.
>
> It's not just about SVN. Nor is it just about messages. It's about
> developing an entirely independent module that implements pack200,
> like I've been saying from the beginning, which has absolutely no
> dependencies on other Harmony code or mixed up with any java*
> libraries. The pack200 code is aimed at being created as a separate
> OSGi bundle that can be used in OSGi containers, Java applications or
> Harmony.
>
> > > Frankly, it's probably easier for me to continue development on a
> > > completely different repository. If you're going to go to the extent
> > > of doing a wait and merge, it's going to be far easier for me to work
> > > against an SVN repo that I can commit directly, and then build myself
> > > and make available for anyone (including Harmony) that wants to use
> > > it.
> >
> > Well, that is always your choice. I'd prefer not to see that happen
> > - having you do the work here is great. I think that we need to just
> > find solutions to these problems that we're all happy with.
>
> I've not done any work here since Nov 20th
> (http://issues.apache.org/jira/browse/HARMONY-2246). I've been waiting
> to get to a solution to this problem that we're all happy with since I
> started here, and it just hasn't happened -- in fact, the dialogue
> only started up when the pack200 code was finally moved to its own
> module and I was about to start work on it again. Yet it seems that we
> are no nearer to a consensus now than we were before.
>
> Alex.
>
--
Alexei Zakharov,
Intel ESSD
Re: Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alex Blewitt <al...@gmail.com>.
On 07/01/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> >> 2) not being able to keep the code at Java 1.4 for portabliity
> >> -> 2) This I think we can handle easily - can we add a small CC
> >> target
> >> that simply compiles this package as 1.4 code? While it doesn't
> >> prevent someone from making an inappropriate change, it does ensure
> >> that if it is changed, it's identified and reversed quickly.
> >
> > That doesn't help for people who try to genericise the code, for
> > example.
>
> Why? it wouldn't compile.
You need this to be in the IDE, and not just in the build target. For
example, at some point between when I last did any work on this
(mid-November) and the reorg of the modules, various annotations were
added (which are now compile time errors in my workspace, because I
have it set to 1.4 compatibility) as well as generics:
http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java?revision=493560&view=markup
http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200Adapter.java?revision=493560&view=markup
These were likely not added intentionally -- the source code is
plastered with comments like 'Dont add generics or annotations' at the
top -- but when loaded as a project in Eclipse, you can do automated
'clean-up' of source files, including the ability to automatically add
cancer like this into a codebase. And because it doesn't show up in
the IDE, you might then continue to do a bunch of work before
committing.
Even if you have the build to compile with -target 1.4, you'll still
potentially end up with a lot of manual work to undo the automated
clean-up.
On the other hand, as a separate project, with separate manifests,
source files, and compiler settings, you can set up the project so
that it compiles against 1.4, and therefore without adding this kind
of stuff in.
I've spent a good 15 minutes going through the code and undoing these
automated clean-ups just so that it compiles again on a 1.4 system. I
really, really don't want to have to do it again.
> > Plus, the manifest should list J2SE-1.4 as its requirements,
> > and not J2SE-1.5 (or J2SE-5 or whatever it is).
>
> That's only because there's one manifest at the moment - there's no
> reason why there can't be other build targets, and therefore other
> manifests.
At what point are you just including one project inside another
project for the sake of it?
> Right - so how do we do this so that there's the appropriate maifest
> for you?
>
> Lets try this - what does the manifest look like?
It'll be a standard OSGi manifest. I'm working on the update to the
project's manifest now, and will commit a patch shortly.
> > Or, just have a separate module. Plus, if there's going to be a
> > separate bundle generated, why not use the fact that one module is a
> > bundle? Why go to all the trouble of setting up a build library that
> > has this separation and then try and force two bundles to live in one
> > module?
>
> Because I think that our notion of module was defined with
> architectural boundaries for the classlibrary, not issues like this.
> So I'm against it being a classlib module.
Isn't this just a more verbose way of saying 'because'? After all,
there's a 'regexp' module separate from the other java.util code; as
is the archive module, too. Perhaps you could explain why it's OK to
have 'regexp' as a separate module, but not pack200? After all, regexp
is just a part of java.util; as for that matter is the java.util.jar
code.
> It may make sense as a jkdtools module for which the classlib has a
> dependency - that's not that much better, but it's an improvement.
There's a distinction between the pack200 executable (which I've not
started work on) and the actual bundle implementing the algorithm.
It's very likely that if this is to be shared elsewhere, it will be
via the bundle and the code, as opposed to the command line (since its
main goal is to be used in programs outside of Harmony).
> > Well, I've also made the point about messages and internationalisation
> > thereof. The goal is for this to be separately downloadable outside of
> > the Harmony APIs; therefore, mixing up messages designed for this
> > bundle with messages in the generic Java util library.
>
> Ah - yes. I remember that and meant to say something about it in my
> last message (today is my last day of vacation and I'm distracted...)
>
> Yes, there should be separate messages.
The problem is that the guidelines state that there's one messages
bundle per module. Ergo, following those guidelines will lead to
message intermixing. In addition, I've already raised the issue about
how to deal with the accidental inclusion with the Harmony core NLS
code. Ideally, I'd want it to be in a separate project that doesn't
have any dependencies on the core Harmony code, so that this can't be
added accidentally as has been done already.
> > The same also goes for the Apache NLS classes. The Pack200 stuff can't
> > rely on that for internationalisation without dragging extra baggage
> > with it. This has already been applied once to the strings in the
> > pack200 code, and I had to manually undo it.
>
> Sure - the key here is to respect these boundaries and you shouldn't
> have to undo - you should squawk and someone who made the change
> should fix it.
It happened again with the code clean-up. It will keep happening if
it's in a project that is defined to use 1.5 defaults. The only way to
prevent it happening is to move it out into a separate project that
only uses 1.4 code.
> > out into a separate module is a bad idea. There seems to be resistance
> > for resistance's sake ("No, let's try and find a way to keep it the
> > same") as opposed to a justification ("We shouldn't do that because
> > ...").
>
> Because our module structure is organized around well-thought-out
> boundaries for a classlibrary for java SE 5, not because of a
> developers issues w/ SVN or our message bundle system or any of the
> other reasons.
That's just a longer form of 'because'. Why should regexp and archive
be in separate modules, when they could be in the same util module?
And given any answer for that, why should the answer be any different
for code that is in 'java.util.jar' be in the same module as
'org.harmony.pack200'? In short, why does this conflict with the
'well-thought-out-boundaries'? Heck, the pack200 stuff is *supposed*
to be modular; it's supposed to be swapped out for any other
implementation of pack200.
It's not just about SVN. Nor is it just about messages. It's about
developing an entirely independent module that implements pack200,
like I've been saying from the beginning, which has absolutely no
dependencies on other Harmony code or mixed up with any java*
libraries. The pack200 code is aimed at being created as a separate
OSGi bundle that can be used in OSGi containers, Java applications or
Harmony.
> > Frankly, it's probably easier for me to continue development on a
> > completely different repository. If you're going to go to the extent
> > of doing a wait and merge, it's going to be far easier for me to work
> > against an SVN repo that I can commit directly, and then build myself
> > and make available for anyone (including Harmony) that wants to use
> > it.
>
> Well, that is always your choice. I'd prefer not to see that happen
> - having you do the work here is great. I think that we need to just
> find solutions to these problems that we're all happy with.
I've not done any work here since Nov 20th
(http://issues.apache.org/jira/browse/HARMONY-2246). I've been waiting
to get to a solution to this problem that we're all happy with since I
started here, and it just hasn't happened -- in fact, the dialogue
only started up when the pack200 code was finally moved to its own
module and I was about to start work on it again. Yet it seems that we
are no nearer to a consensus now than we were before.
Alex.
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Jan 7, 2007, at 5:50 PM, Alex Blewitt wrote:
> On 07/01/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>> From what I grok, Alex has problems with
>>
>> 1) not having patches applied fast enough
>> -> 1) I vote that Alexei is responsible for getting patches in SVN :)
>
> It's not so much the patches being applied fast enough. The problem is
> that if I'm adding a new file, and I contribute that, I effectively
> can't work on it any more until the file is applied. That's because
> when it's subsequently added SVN throws a wobbly and refuses to do
> anything because there's a file already there. I'm going to get this
> anyway -- solution is to delete and then svn up -- but if I've made
> changes to that file (or someone else has made changes that I don't
> have) then any further changes get lost. It's less of a problem when
> there are already added files there, but most patches I've submitted
> have had new files in place, and it does take me a while to sync after
> a patch has been applied.
Right - that's not a solution. You shouldn't have to do otherworldly
and weird things like that.
Now, I'm expecting that over time, other contributors will have or do
have the same problems, so we should work out a suggested method for
doing this.
How about svk?
>
> As such, I've found it easier to wait until a patch has been applied,
> so that I can do an svn up knowing I've not lost any of my new files.
>
>> 2) not being able to keep the code at Java 1.4 for portabliity
>> -> 2) This I think we can handle easily - can we add a small CC
>> target
>> that simply compiles this package as 1.4 code? While it doesn't
>> prevent someone from making an inappropriate change, it does ensure
>> that if it is changed, it's identified and reversed quickly.
>
> That doesn't help for people who try to genericise the code, for
> example.
Why? it wouldn't compile.
> Plus, the manifest should list J2SE-1.4 as its requirements,
> and not J2SE-1.5 (or J2SE-5 or whatever it is).
That's only because there's one manifest at the moment - there's no
reason why there can't be other build targets, and therefore other
manifests.
> There's also the issue
> of compile time libraries; you can compile against a 1.5 system with
> 1.4 code compatibility, but still end up using e.g. System.nanoTime()
> inadvertently. As a separate project, with 1.4 in the manifest, I can
> actually compile against the real 1.4 VM libraries on my machine; and
> know that I'm not going to get burnt by accidental inclusion of an API
> that's not there.
Right - so how do we do this so that there's the appropriate maifest
for you?
Lets try this - what does the manifest look like?
>
>
>> 3) ease of use working w/in eclipse because of other packages (java/
>> util/*) as well as manifest drek
>>
>> -> 3) I don't quite know what to do here, other than setup a work
>> environment in a sandbox where we use the svn switch trick to just
>> let the code get checked out as a workable tree, yet still have the
>> checkins happen where we like them to be, in the archive tree
>
> Or, just have a separate module. Plus, if there's going to be a
> separate bundle generated, why not use the fact that one module is a
> bundle? Why go to all the trouble of setting up a build library that
> has this separation and then try and force two bundles to live in one
> module?
Because I think that our notion of module was defined with
architectural boundaries for the classlibrary, not issues like this.
So I'm against it being a classlib module.
It may make sense as a jkdtools module for which the classlib has a
dependency - that's not that much better, but it's an improvement.
>
>> 4) what else?
>
> Well, I've also made the point about messages and internationalisation
> thereof. The goal is for this to be separately downloadable outside of
> the Harmony APIs; therefore, mixing up messages designed for this
> bundle with messages in the generic Java util library.
Ah - yes. I remember that and meant to say something about it in my
last message (today is my last day of vacation and I'm distracted...)
Yes, there should be separate messages.
>
> The same also goes for the Apache NLS classes. The Pack200 stuff can't
> rely on that for internationalisation without dragging extra baggage
> with it. This has already been applied once to the strings in the
> pack200 code, and I had to manually undo it.
Sure - the key here is to respect these boundaries and you shouldn't
have to undo - you should squawk and someone who made the change
should fix it.
>
>> I'm hoping we can find solutions to these. Some suggestions about
>> the individual pieces...
>
> Personally, I'd also like to hear from people about why moving this
> out into a separate module is a bad idea. There seems to be resistance
> for resistance's sake ("No, let's try and find a way to keep it the
> same") as opposed to a justification ("We shouldn't do that because
> ..."). I've been arguing since the beginning that it made sense to
> keep it separate, and justified the reasons for doing so. I don't
> believe that there have been reasons given against moving it out, just
> that it should not be moved out.
Because our module structure is organized around well-thought-out
boundaries for a classlibrary for java SE 5, not because of a
developers issues w/ SVN or our message bundle system or any of the
other reasons.
I certainly understand the arguments for separation.
>
>> Another solution is to simply have Alex submit a work environment
>> that we place in the sandbox, and from time to time we migrate code
>> from there into modules/archive?
>
> Frankly, it's probably easier for me to continue development on a
> completely different repository. If you're going to go to the extent
> of doing a wait and merge, it's going to be far easier for me to work
> against an SVN repo that I can commit directly, and then build myself
> and make available for anyone (including Harmony) that wants to use
> it.
Well, that is always your choice. I'd prefer not to see that happen
- having you do the work here is great. I think that we need to just
find solutions to these problems that we're all happy with.
geir
>
> Looking forward to your thoughts,
>
> Alex.
Re: Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alex Blewitt <al...@gmail.com>.
On 07/01/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> From what I grok, Alex has problems with
>
> 1) not having patches applied fast enough
> -> 1) I vote that Alexei is responsible for getting patches in SVN :)
It's not so much the patches being applied fast enough. The problem is
that if I'm adding a new file, and I contribute that, I effectively
can't work on it any more until the file is applied. That's because
when it's subsequently added SVN throws a wobbly and refuses to do
anything because there's a file already there. I'm going to get this
anyway -- solution is to delete and then svn up -- but if I've made
changes to that file (or someone else has made changes that I don't
have) then any further changes get lost. It's less of a problem when
there are already added files there, but most patches I've submitted
have had new files in place, and it does take me a while to sync after
a patch has been applied.
As such, I've found it easier to wait until a patch has been applied,
so that I can do an svn up knowing I've not lost any of my new files.
> 2) not being able to keep the code at Java 1.4 for portabliity
> -> 2) This I think we can handle easily - can we add a small CC target
> that simply compiles this package as 1.4 code? While it doesn't
> prevent someone from making an inappropriate change, it does ensure
> that if it is changed, it's identified and reversed quickly.
That doesn't help for people who try to genericise the code, for
example. Plus, the manifest should list J2SE-1.4 as its requirements,
and not J2SE-1.5 (or J2SE-5 or whatever it is). There's also the issue
of compile time libraries; you can compile against a 1.5 system with
1.4 code compatibility, but still end up using e.g. System.nanoTime()
inadvertently. As a separate project, with 1.4 in the manifest, I can
actually compile against the real 1.4 VM libraries on my machine; and
know that I'm not going to get burnt by accidental inclusion of an API
that's not there.
> 3) ease of use working w/in eclipse because of other packages (java/
> util/*) as well as manifest drek
>
> -> 3) I don't quite know what to do here, other than setup a work
> environment in a sandbox where we use the svn switch trick to just
> let the code get checked out as a workable tree, yet still have the
> checkins happen where we like them to be, in the archive tree
Or, just have a separate module. Plus, if there's going to be a
separate bundle generated, why not use the fact that one module is a
bundle? Why go to all the trouble of setting up a build library that
has this separation and then try and force two bundles to live in one
module?
> 4) what else?
Well, I've also made the point about messages and internationalisation
thereof. The goal is for this to be separately downloadable outside of
the Harmony APIs; therefore, mixing up messages designed for this
bundle with messages in the generic Java util library.
The same also goes for the Apache NLS classes. The Pack200 stuff can't
rely on that for internationalisation without dragging extra baggage
with it. This has already been applied once to the strings in the
pack200 code, and I had to manually undo it.
> I'm hoping we can find solutions to these. Some suggestions about
> the individual pieces...
Personally, I'd also like to hear from people about why moving this
out into a separate module is a bad idea. There seems to be resistance
for resistance's sake ("No, let's try and find a way to keep it the
same") as opposed to a justification ("We shouldn't do that because
..."). I've been arguing since the beginning that it made sense to
keep it separate, and justified the reasons for doing so. I don't
believe that there have been reasons given against moving it out, just
that it should not be moved out.
> Another solution is to simply have Alex submit a work environment
> that we place in the sandbox, and from time to time we migrate code
> from there into modules/archive?
Frankly, it's probably easier for me to continue development on a
completely different repository. If you're going to go to the extent
of doing a wait and merge, it's going to be far easier for me to work
against an SVN repo that I can commit directly, and then build myself
and make available for anyone (including Harmony) that wants to use
it.
Looking forward to your thoughts,
Alex.
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Yarg.
Ok, I'm really, really sorry that it took me this long to speak up -
I had meant to for a while, but was letting people discuss, and also
sorta got burned out in December, and didn't think anyone would do
anything until we all got going in the New Year, but Alexei took me
by surprise. Serves me right for waiting, I guess.
First, I think that in the future, we need to be more proactive and
clearer about things like this. I don't think we have consensus -
clearly I'd count Tim and Nathan as indicating a preference to avoid
a new module, and I am not in favor of another module either, for
both technical and community reasons.
That said, I'd also like to see us find a solution where Alex is
happy and he can keep doing this great work on it. I suspect that in
the end, no one will get everything they want, but we maybe be able
to find a better position than where we are now.
From what I grok, Alex has problems with
1) not having patches applied fast enough
2) not being able to keep the code at Java 1.4 for portabliity
3) ease of use working w/in eclipse because of other packages (java/
util/*) as well as manifest drek
4) what else?
I'm hoping we can find solutions to these. Some suggestions about
the individual pieces...
1) I vote that Alexei is responsible for getting patches in SVN :)
2) This I think we can handle easily - can we add a small CC target
that simply compiles this package as 1.4 code? While it doesn't
prevent someone from making an inappropriate change, it does ensure
that if it is changed, it's identified and reversed quickly.
3) I don't quite know what to do here, other than setup a work
environment in a sandbox where we use the svn switch trick to just
let the code get checked out as a workable tree, yet still have the
checkins happen where we like them to be, in the archive tree
4)?
Another solution is to simply have Alex submit a work environment
that we place in the sandbox, and from time to time we migrate code
from there into modules/archive?
geir
On Jan 7, 2007, at 4:24 AM, Alex Blewitt wrote:
> Great, thanks for that. I'll investigate the Segment test ... it's
> probably because it was looking a resource up by name and if the
> resources/ have moved into the harmony/pack200 folder it can't find
> them. Shouldn't be too tricky to fix.
>
> I'll also update the Manifest and/or other files that fixing and
> submit a patch shortly.
>
> Thanks again!
>
> Alex.
>
> On 06/01/07, Alexei Zakharov <al...@gmail.com> wrote:
>> Hi all,
>>
>> I've just finished with moving pack200 code to the new module
>> (r493560). The name of the new module is "pack200" (no surprises),
>> new
>> package names start with "org.apache.harmony.pack200". The build can
>> be customized for using arbitrary build source and build target (Alex
>> has asked for it). One test is currently failing:
>> org/apache/harmony/pack200/tests/SegmentTest
>> so I've put it to the exclude list. I don't know why does it fail,
>> probably because of the package name change. I suppose Alex can shed
>> light on it. There are also files that probably need fixing -
>> META-INF/MANIFEST.MF for example. So patches are welcome as always.
>>
>> I've seen build failure alerts after my commits - there were problems
>> with ant clean. After running ant clean twice all problems disappear
>> on my machine. So..
>>
>> Thanks for your attention and Merry Christmas to the Orthodox part of
>> the community,
>>
>> 2006/12/14, Alexei Zakharov <al...@gmail.com>:
>> > All,
>> >
>> > Does anyone have real objections to this Alex's proposal? If no
>> I can
>> > take care of it.
>> >
>> > Thanks,
>> >
>> > 2006/12/14, Alex Blewitt <al...@gmail.com>:
>> > > > Agreed, in general we cannot serialize on waiting for
>> patches to be
>> > > > committed before moving on, and keeping track of your
>> development can be
>> > > > a problem in the face of multiple patches and commits etc.
>> > >
>> > > Actually, in this case, there is no patch. This is the discussion
>> > > about moving the pack200 code to a separate module [1], like
>> I've been
>> > > suggesting from the beginning [2], so that it can be built with a
>> > > lower Java version (both via the build.xml, the associated
>> Eclipse
>> > > metadata and the compliance settings for the bundle itself)
>> than the
>> > > remainder of the archive module. It will also mean that we
>> don't end
>> > > up with messages being mixed together, which will be more of a
>> problem
>> > > when it comes to distributing the decoding as a separate bundle
>> > > externally to Harmony, which was one of my original
>> motiviations in
>> > > doing this [2]
>> > >
>> > > In any case, it doesn't make sense to me to be in-flight doing
>> work
>> > > whilst the code is in the wrong place (from my point of view, at
>> > > least). Generating SVN patches after doing a lot of (renaming)
>> > > refactoring seems to break things, and the only way that the most
>> > > recent set of code was integrated was by me providing the entire
>> > > contents of the project that I was working on. If there's
>> directory
>> > > moves (and/or package names, if it moves to a different
>> module) then
>> > > it's going to make that process a lot more painful than it
>> already is.
>> > >
>> > > I'm sure there's reasons why the general feeling is that it
>> shouldn't
>> > > be moved out into its own module, but I've not seen a
>> suggestion yet
>> > > which addresses the issues I've outlined above; though please
>> let me
>> > > know if I've misunderstood something and it is in fact possible.
>> > >
>> > > Unfortunately, I get the feeling we're at an impasse on this,
>> and that
>> > > in order to achieve my original goal of having an
>> implementation that
>> > > could be used by other OSGi systems, it would be better to
>> develop
>> > > this as an entirely standalone OSGi bundle which Harmony could
>> then
>> > > chose to use if it wanted. This isn't my preferred option,
>> since after
>> > > all Harmony needs this code, and it's likely to be a better up-
>> stream
>> > > source for changes in the future, but rather than me trying to
>> > > repeatedly initiate conversations about why I think it would
>> be better
>> > > to move it to a separate module, it will likely be easier for
>> me to
>> > > develop code against a repository which I have write access
>> and an
>> > > structure it appropriately. Since it too will be licensed
>> under AL,
>> > > Harmony can then chose to take advantage of it or someone else
>> can
>> > > continue working on the codebase so far.
>> > >
>> > > Alex.
>> > >
>> > > [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-
>> dev/200610.mbox/%
>> 3C636fd28e0610141654rcd650f8x32c7c2b311a5fd65@mail.gmail.com%3E
>> > >
>> > > [2] http://mail-archives.apache.org/mod_mbox/incubator-harmony-
>> dev/200605.mbox/%
>> 3c636fd28e0605251346m47a5289ch1e61ce611d0de615@mail.gmail.com%3e
>>
>> --
>> Alexei Zakharov,
>> Intel ESSD
>>
Re: [classlib][pack200] new module (was: [classlib][pack200] Development has stalled :-( )
Posted by Alex Blewitt <al...@gmail.com>.
Great, thanks for that. I'll investigate the Segment test ... it's
probably because it was looking a resource up by name and if the
resources/ have moved into the harmony/pack200 folder it can't find
them. Shouldn't be too tricky to fix.
I'll also update the Manifest and/or other files that fixing and
submit a patch shortly.
Thanks again!
Alex.
On 06/01/07, Alexei Zakharov <al...@gmail.com> wrote:
> Hi all,
>
> I've just finished with moving pack200 code to the new module
> (r493560). The name of the new module is "pack200" (no surprises), new
> package names start with "org.apache.harmony.pack200". The build can
> be customized for using arbitrary build source and build target (Alex
> has asked for it). One test is currently failing:
> org/apache/harmony/pack200/tests/SegmentTest
> so I've put it to the exclude list. I don't know why does it fail,
> probably because of the package name change. I suppose Alex can shed
> light on it. There are also files that probably need fixing -
> META-INF/MANIFEST.MF for example. So patches are welcome as always.
>
> I've seen build failure alerts after my commits - there were problems
> with ant clean. After running ant clean twice all problems disappear
> on my machine. So..
>
> Thanks for your attention and Merry Christmas to the Orthodox part of
> the community,
>
> 2006/12/14, Alexei Zakharov <al...@gmail.com>:
> > All,
> >
> > Does anyone have real objections to this Alex's proposal? If no I can
> > take care of it.
> >
> > Thanks,
> >
> > 2006/12/14, Alex Blewitt <al...@gmail.com>:
> > > > Agreed, in general we cannot serialize on waiting for patches to be
> > > > committed before moving on, and keeping track of your development can be
> > > > a problem in the face of multiple patches and commits etc.
> > >
> > > Actually, in this case, there is no patch. This is the discussion
> > > about moving the pack200 code to a separate module [1], like I've been
> > > suggesting from the beginning [2], so that it can be built with a
> > > lower Java version (both via the build.xml, the associated Eclipse
> > > metadata and the compliance settings for the bundle itself) than the
> > > remainder of the archive module. It will also mean that we don't end
> > > up with messages being mixed together, which will be more of a problem
> > > when it comes to distributing the decoding as a separate bundle
> > > externally to Harmony, which was one of my original motiviations in
> > > doing this [2]
> > >
> > > In any case, it doesn't make sense to me to be in-flight doing work
> > > whilst the code is in the wrong place (from my point of view, at
> > > least). Generating SVN patches after doing a lot of (renaming)
> > > refactoring seems to break things, and the only way that the most
> > > recent set of code was integrated was by me providing the entire
> > > contents of the project that I was working on. If there's directory
> > > moves (and/or package names, if it moves to a different module) then
> > > it's going to make that process a lot more painful than it already is.
> > >
> > > I'm sure there's reasons why the general feeling is that it shouldn't
> > > be moved out into its own module, but I've not seen a suggestion yet
> > > which addresses the issues I've outlined above; though please let me
> > > know if I've misunderstood something and it is in fact possible.
> > >
> > > Unfortunately, I get the feeling we're at an impasse on this, and that
> > > in order to achieve my original goal of having an implementation that
> > > could be used by other OSGi systems, it would be better to develop
> > > this as an entirely standalone OSGi bundle which Harmony could then
> > > chose to use if it wanted. This isn't my preferred option, since after
> > > all Harmony needs this code, and it's likely to be a better up-stream
> > > source for changes in the future, but rather than me trying to
> > > repeatedly initiate conversations about why I think it would be better
> > > to move it to a separate module, it will likely be easier for me to
> > > develop code against a repository which I have write access and an
> > > structure it appropriately. Since it too will be licensed under AL,
> > > Harmony can then chose to take advantage of it or someone else can
> > > continue working on the codebase so far.
> > >
> > > Alex.
> > >
> > > [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3C636fd28e0610141654rcd650f8x32c7c2b311a5fd65@mail.gmail.com%3E
> > >
> > > [2] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200605.mbox/%3c636fd28e0605251346m47a5289ch1e61ce611d0de615@mail.gmail.com%3e
>
> --
> Alexei Zakharov,
> Intel ESSD
>