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.
Summary: | Source code annotations to simplify module development | ||
---|---|---|---|
Product: | platform | Reporter: | Jesse Glick <jglick> |
Component: | Module System | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | anebuzelsky, apireviews, jlahoda, jtulach, mkleint, mmetelka, mzlamal, pzajac, rmichalsky, tomwheeler |
Priority: | P1 | Keywords: | API_REVIEW, PLAN, UMBRELLA |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://wiki.netbeans.org/DeclarativeRegistrationUsingAnnotations | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 147393, 149136, 150447, 153093 | ||
Bug Blocks: | |||
Attachments: |
Outstanding changesets
New outstanding changesets New outstanding changesets |
Description
Jesse Glick
2008-10-21 05:48:23 UTC
Created attachment 72339 [details]
Outstanding changesets
I have written up a detailed discussion of the problem, proposed solution, and other issues in the referenced wiki page. I appreciate any effort which aims to simplify module development. As noted in the Wiki describing the proposal, there are already two methods of registering services, but it was not clear to me from (and I admit I have so far just read it quickly) whether the new annotation-based method was going to be the preferred approach for new code. It's already somewhat confusing to module developers now when to choose the META-INF/services versus doing registration in layer files. My concern is that adding an additional method of registering services without clarifying when to use each one will wind up confusing rather than helping developers. It was also not clear to me what, if any, precedence will be used to resolve conflicts among these different methods. For example, what happens if a module declares a service via annotations and another module hides it via the layer file? Will it be available? What happens in the opposite case? I guess this scenario is possible even now with META-INF/services and layer registration, but I'd think it would be more likely to happen in the future based on what I see in the proposal. Overall, I like what I read and plan to comment more after I have had time to consider it more. Use of annotations would be encouraged for all new code in all situations where annotations were available. I agree that there is a risk that new developers might become confused by their options, especially if they have been perusing a mix of old and new documentation. The proposed system is purely a build-time convenience, so it does not change runtime semantics or precedence rules. M-I/s registrations can be hidden by other M-I/s files (using #- syntax, also supported directly from @Service), and layer registrations can be hidden by other layers (using _hidden files). Created attachment 72499 [details]
New outstanding changesets
The conf call review is going to happen on Thursday Oct 30, around 18.30-19.30CET (exact time to be specified on Wednesday). Everyone who wants to join the conf call, please write me an email. I'll send to dial in info. Prague meets in Olympia. Voting reviewers include me, Jan Lahoda and we need two more - any volunteers? Created attachment 72634 [details]
New outstanding changesets
Infrastructure merged in core-main #78103b644dfc. Integrated into 'main-golden', will be available in build *200811041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/78103b644dfc User: Jesse Glick <jglick@netbeans.org> Log: #150804: infrastructure for annotation processors. Consider implemented in 6.7 at least for some cases. |