From notifications-return-13033-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Mon Jul 2 07:55:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E088B180626 for ; Mon, 2 Jul 2018 07:55:04 +0200 (CEST) Received: (qmail 3821 invoked by uid 500); 2 Jul 2018 05:55:04 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 3811 invoked by uid 99); 2 Jul 2018 05:55:03 -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; Mon, 02 Jul 2018 05:55:03 +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 87B94184ED6 for ; Mon, 2 Jul 2018 05:55:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id oIwNN01HkxgN for ; Mon, 2 Jul 2018 05:55:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2415E5F41A for ; Mon, 2 Jul 2018 05:55:01 +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 58423E0144 for ; Mon, 2 Jul 2018 05:55:00 +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 154CC21832 for ; Mon, 2 Jul 2018 05:55:00 +0000 (UTC) Date: Mon, 2 Jul 2018 05:55:00 +0000 (UTC) From: =?utf-8?Q?Josef_H=C3=A4rtl_=28JIRA=29?= To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (GROOVY-8666) groovy-all pom approach breaks OSGi due to split-packages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GROOVY-8666?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D165= 29409#comment-16529409 ]=20 Josef H=C3=A4rtl edited comment on GROOVY-8666 at 7/2/18 5:54 AM: ------------------------------------------------------------- OK thanks. I'll do some tests with the Snapshots in our application(s). I agree to the presumption to include this only to 2.X, not to 3.X.=C2=A0Re= solving the split in the package structure for java modules should also men= d it for osgi. On automatically testing it in a test suite: As unsatisfactory as it is: I'= m unsure of how or even whether this can be done realistically. The ones who initially designed our application once designed it w/o tests = regarding osgi itself, they just did junit tests that considered the osgi b= undles as plain java and mocked osgi apart. As one can see with this ticket= , this won't always suffice.=C2=A0 Some time ago we=C2=A0implemented some kind of verification-feature inside = our application=C2=A0itself that can be used by our users, but also by ours= elves to verify the application as a whole is behaving like it should and t= o verify it still behaves like in previous releases. That way it's tested i= n the most realistic way possible.=C2=A0Many tests in there are using groov= y. However, the shadowed package area was small enough to leap through our = tests / did not interfere with them. Complex as they were, they did not use= xml parsing of groovy. I'm also increasing our tests for shadowing/split-packages in general. But = this is also done without junit or the like. Instead, i'm analysing the str= ucture of all our osgi bundles by a custom script producing a list of poten= tial overlaps to be examined by some of us. Only this way i can see all pot= ential overlaps without relying on sheer luck testing the right thing at th= e right time or relying on implementations.=C2=A0This way i also found the = fragment-approach as eclipse itself makes much use of it. Other than that, it's going to be difficult i'm afraid. Already testing out= the bug of this ticket proved that: While our client (based on Eclipse RCP= that's based on equinox) showed random behaviour whether XPathUtil would b= e present or not (depending on the loading order of the bundles), our serve= r (equinox-jetty) more or less resorted to a state of constant denial. In t= he end shadowing/split-package-problems like this totally depend on the loa= ding order. From then on, it can be random, never found or always occur. Fr= om a quick search: There seem to be some libraries for testing osgi inside = an osgi environment. But in the end the results will heavily depend on thei= r loading mechanism and configuration. As some kind of osgi-tester would ha= ve to include something like that, it would bias the result straight away. So i'm a bit out of luck on that. Should some osgi expert come by, i would = appreciate any input on automatically testing something like this myself. was (Author: josef h=C3=A4rtl): OK thanks. I'll do some tests with the Snapshots in our application(s). I agree to the presumption to include this only to 2.X, not to 3.X.=C2=A0Re= solving the split in the package structure for java modules should also men= d it for osgi. On automatically testing it in a test suite: As unsatisfactory as it is: I'= m unsure of how or even whether this can be done realistically. The ones who initially designed our application once designed it w/o tests = regarding osgi itself, they just did junit tests that considered the osgi b= undles as plain java and mocked osgi apart. As one can see with this ticket= , this won't always suffice.=C2=A0 Some time ago we=C2=A0implemented some kind of verification-feature inside = our application=C2=A0itself that can be used by our users, but also by ours= elves to verify the application as a whole is behaving like it should and t= o verify it still behaves like in previous releases. That way it's tested i= n the most realistic way possible.=C2=A0Many tests in there are using groov= y. However, the shadowed package area was smally enough to leap through our= tests / did not interfere with them. Complex as they were, they did not us= e xml parsing of groovy. I'm also increasing our tests for shadowing/split-packages in general. But = this is also done without junit or the like. Instead, i'm analysing the str= ucture of all our osgi bundles used by a custom script producing a list of = potential overlaps to be examined by some of us. Only this way i can see al= l potential overlaps without relying on sheer luck testing the right thing = at the right time.=C2=A0This way i also found the fragment-approach as ecli= pse itself makes much use of it. Other than that, it's going to be difficult i'm afraid. Already testing out= the bug of this ticket proved that: While our client (based on Eclipse RCP= that's based on equinox) showed random behaviour whether XPathUtil would b= e present or not (depending on the loading order of the bundles), our serve= r (equinox-jetty) more or less resorted to a state of constant denial. In t= he end shadowing/split-package-problems like this totally depend on the loa= ding order. From then on, it can be random, never found or always occur. Fr= om a quick search: There seem to be some libraries for testing osgi inside = an osgi environment. But in the end the results will heavily depend on thei= r loading mechanism and configuration. As some kind of osgi-tester would ha= ve to include something like that, it would bias the result straight away. So i'm a bit out of luck on that. Should some osgi expert come by, i would = appreciate any input on automatically testing something like this myself. > groovy-all pom approach breaks OSGi due to split-packages > --------------------------------------------------------- > > Key: GROOVY-8666 > URL: https://issues.apache.org/jira/browse/GROOVY-8666 > Project: Groovy > Issue Type: Bug > Components: release > Affects Versions: 2.5.0 > Reporter: Josef H=C3=A4rtl > Assignee: Paul King > Priority: Critical > Fix For: 2.5.1 > > > The splitting of groovy into smaller causes another, very major, problem: > First, consider the "main" groovy jar: It contains the package groovy.uti= l with numerous classes. > Secondly, consider the=C2=A0groovy-xml jar. It contains the package groov= y.util and therein the classes XMLParser etc. > Regardless whether you use OSGi (like in our case) or Java 9 (what we are= migrating to): This presents a split-package itself: As we already reprodu= ced in our build: Whatever jar of these is loaded first wins the groovy.uti= l package and "overrides" the other. > As a result, it's become random whether our users can use XMLParser or no= t. Sometimes it is found, sometimes it's not. I consider this a very major = problem and a blocker as it makes execution unreliable and randomish. I did= not check but somewhat guess that this is not the only collision of this s= ort. > Therefore, the splitting of groovy 2.5 into smaller pieces introduced spl= it-packages to itself. If one wants to split groovy, the split will have to= follow package borders. -- This message was sent by Atlassian JIRA (v7.6.3#76005)