This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 38057 - Removing module is not well handed
Summary: Removing module is not well handed
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 33569
Blocks: 38360 39695
  Show dependency tree
 
Reported: 2003-12-12 15:40 UTC by _ pkuzel
Modified: 2008-12-22 19:49 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pkuzel 2003-12-12 15:40:46 UTC
> I changed module name in manifest from
bla.api.bla > to bla.blaapi. Now I get
DuplicateException caused > by fact that under
system/Modules remains the old > entry. Manual
erasing helps.

[jglick] Generally changing module code names is
not supported and should be avoided if at all
possible. I am not exactly sure how a
DuplicateException would arise from it though.
File a bug if you want.



I prefer renaming module manifest entry over
renaming it's jar too. I have not seen any harm
except the exception => ENHANCEMENT.
Comment 1 Jesse Glick 2003-12-12 16:11:02 UTC
Details please - what exactly did you rename and how? And when did you
get the exception? Using AU, or part of a regular build? Etc. Need
steps to reproduce what happened to you in order to understand what
the problem is.
Comment 2 _ pkuzel 2003-12-15 09:09:45 UTC
I renamed org.netbeans.api.tasklist/1 to
org.netbeans.modules.tasklistapi/1. I deployed using cp
tasklist-api.jar ../nbbuild/netbeans/modules/autoload. Then I got the
exception during every startup until I removed stalled
Modules/org-netbeans-api-tasklist.xml.
Comment 3 Jesse Glick 2003-12-19 14:34:44 UTC
I have seen it too. Probably a result of renaming the code name base
of some tasklist module, which is definitely not a good idea in
general. When I have a moment I will look at making the handling more
robust. Might have to wait until a planned change for the future to
canonicalize all module JAR names and remove autoscanning of
modules/*.jar, but this would be a fairly high-impact change.
Comment 4 Jesse Glick 2004-03-28 13:05:59 UTC
When all module JARs have fixed names, you will not be allowed to
rename one thing independently and there should be no possibility of a
DuplicateException.

Anyway changing a module code name base is *never* recommended.
Comment 5 _ pkuzel 2004-03-29 09:25:35 UTC
The intent was to reuse existing jar (name). I was unsure how could I
declare that some jar name was discontiued (and should be erased e.g.
on jar name and a manifest entry match).

Reopening with changed synopsis rename => remove.
Comment 6 Jesse Glick 2004-03-29 13:50:41 UTC
There is no particular means of forcing a given module to be removed,
other than intentionally breaking compatibility of something it
depends on. (I.e. depends on behavior of AU client.) Anyway in the
case that triggered this, you were trying to rename a module, not
remove it, AFAICT.
Comment 7 _ pkuzel 2004-03-29 14:02:13 UTC
Actually I wanted to remove the jar. To avoid possible problems with
stale jar. I decided to "reuse" the archive for another module.

In past I did the same with parser.jar. In this case it was replaced
by empty jar.
Comment 8 Jesse Glick 2004-03-29 14:32:44 UTC
As of D, you will not be able to choose the JAR name - it will be
determined by the module code name base and it will be impossible to
override that name.

Re. supporting removal of a module through some kind of trick like
this - not supported now, no particular plans to support in the
future. Leaving open, pending a specific set of use cases etc.
Comment 9 Jesse Glick 2005-10-04 04:16:15 UTC
Referring to my previous comment: nothing has come up, so closing for now.