Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 24130200C81 for ; Fri, 26 May 2017 16:57:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 22D33160BB8; Fri, 26 May 2017 14:57:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 69AFB160BAF for ; Fri, 26 May 2017 16:57:07 +0200 (CEST) Received: (qmail 32303 invoked by uid 500); 26 May 2017 14:57:06 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 32292 invoked by uid 99); 26 May 2017 14:57:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2017 14:57:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id F284E1813AB for ; Fri, 26 May 2017 14:57:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id txSEKMKwtDqx for ; Fri, 26 May 2017 14:57:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DC7AF5FD94 for ; Fri, 26 May 2017 14:57:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6551CE0933 for ; Fri, 26 May 2017 14:57:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1D1D921B56 for ; Fri, 26 May 2017 14:57:04 +0000 (UTC) Date: Fri, 26 May 2017 14:57:04 +0000 (UTC) From: "Paul Merlin (JIRA)" To: dev@polygene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (POLYGENE-257) Custom IdentityGenerator or Serialization hidden by default assemblers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 26 May 2017 14:57:08 -0000 [ https://issues.apache.org/jira/browse/POLYGENE-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026368#comment-16026368 ] Paul Merlin commented on POLYGENE-257: -------------------------------------- Yeah, the added magic layer is not a nice solution. Or it would need to be read-only and hidden. Which sounds very ad-hoc. I agree we should remove both IdentityGenerator and Serialization from defaultAssemblers. But I think we need to provide some convenience for both tests and applications assemblies. It basically should be an opt-in. For AbstractPolygeneTest it could be enabled by default with a way to opt-out. I also think we should have "default services", but no "fallbacks", and treat MetricsProvider the same way. So that the service semantics can apply directly. For both applications and non-trivial tests one will want to opt-in on a given Layer/Module. Moreover, one may want the default IdentityGenerator but not the default Serialization etc... Here are a few assembly api proposals: {code} // on the ModuleAssembly: moduleAssembly.defaultServices() .visibleIn( Visibility.application ); // for each "default service": moduleAssembly.defaultIdentityGenerator() .visibleIn( Visibility.application ); moduleAssembly.defaultSerialization() .visibleIn( Visibility.application ); moduleAssembly.defaultMetricsProvider() .visibleIn( Visibility.application ); {code} These would return a classic `ServiceDeclaration`. It'd be easily usable with SingletonAssembler, tests etc.. while providing fine grained control for non trivial assemblies. On a side note, ideally, service lookup exceptions should guide the user towards resolving her assembly errors. For now they only say, not found, here are the ones that you could have found. That's not very useful. For injections, knowing what required a service without having to "decypher" the stacktrace would be way better. > Custom IdentityGenerator or Serialization hidden by default assemblers > ---------------------------------------------------------------------- > > Key: POLYGENE-257 > URL: https://issues.apache.org/jira/browse/POLYGENE-257 > Project: Polygene > Issue Type: Bug > Reporter: Paul Merlin > Assignee: Paul Merlin > Fix For: 3.0.0 > > > See https://lists.apache.org/thread.html/9b28a67e75cb8952202d0b0b029de53fc19257b733907408ba20ccde@%3Cdev.polygene.apache.org%3E -- This message was sent by Atlassian JIRA (v6.3.15#6346)