From users-return-3954-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Mon Feb 25 21:23:59 2019 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 90B89180626 for ; Mon, 25 Feb 2019 22:23:58 +0100 (CET) Received: (qmail 65847 invoked by uid 500); 25 Feb 2019 21:23:57 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 65837 invoked by uid 99); 25 Feb 2019 21:23:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2019 21:23:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 257B6C723B for ; Mon, 25 Feb 2019 21:23:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2 X-Spam-Level: ** X-Spam-Status: No, score=2 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=asert-com-au.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jajBi7Pdq_MJ for ; Mon, 25 Feb 2019 21:23:54 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 01C0E5F1E3 for ; Mon, 25 Feb 2019 21:23:53 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id x7so8844076eds.8 for ; Mon, 25 Feb 2019 13:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asert-com-au.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to; bh=UN4f8AkNES2OQuO971kLy5YSmR9uJfPQeTrNkzXz/b0=; b=nlhCFqSub2dSmeTVcbKqP/5b32dEWMU8/kPymddpqCefuUIJY75AyolZTK9hM+gKZ0 0LOjAuf6H4ws3q/pVZ+sHI+7FN0WU5e72vrQ3D1ZzgThtSbAM+uuzux3sWoMOrBFpQfL cYhzgItLnksvF8akAiLeYMTZlQ4+gQJyISPmTxqJJ9102/RaIiikJ9NnaN+ca/B1LaRP +kSWb9UvV4+7KqHWDmgzCs/aMSgd6Va3LmMTo5zqKDJtjMtEdsUSHNAL+Cu0cXC5lMK0 enjlGwkwL2rVKSV0UCs/36OezHnQxS+k/IchGMq9RzybqI9qiR2j/n9m6ItH+ULupppz F2sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=UN4f8AkNES2OQuO971kLy5YSmR9uJfPQeTrNkzXz/b0=; b=bht+6oLd9nb9CCJkHyi1cGluXAzvny6nPJe+3Y9sFjEiApz0DtGPkrDUMXM+UZ0wZh /BkkF3Ewxb+Emhygk0pEIrtgQHUcryYXI/HUwyqJxV/We/TaH00u9Ra5Vmyc2Q1rO3BX VgIHhMEvyA7nOKbLJGh797mnfAOzCD/bcEDypH4bzbiI0nQBf1oB8XQa5BMGpIUlDsh9 Ct5LL01YafzY0PoU79ns8FRQmY8cpORnTrXVZaPKgdNxtG8lrJnsDVivVGwdd/LrPc7j jvPErXZqPA/O+HS3bqfUpYzYKlY4wKMzNx4TH3XON8yTZxKpMHmdL1hfDx3ah2Y6977e nIeg== X-Gm-Message-State: AHQUAuaNtPFiC46jzK+YKJ6qZ+JbWCOBcck5H7P6mf5hlqeIB2Hnhn+Y Pd8TIhuEMMBgo5FYEtRZxNljx+5qs7etDv3OZrVO1G4o X-Google-Smtp-Source: AHgI3Ibe3n+3SBdm0cqFgksDkZ8cFaHBqN1UF95rBhJaa8yOGvdxf0+Cm5/Dow1AzCV+OjxQRr4um8wlk83vAOJFOYU= X-Received: by 2002:a50:a4b1:: with SMTP id w46mr10733244edb.215.1551129832472; Mon, 25 Feb 2019 13:23:52 -0800 (PST) MIME-Version: 1.0 References: <4464811550589838@iva3-294f9af87d55.qloud-c.yandex.net> <9489051550673273@myt6-67cd1de25d8a.qloud-c.yandex.net> <1146471551107995@myt6-2fee75662a4f.qloud-c.yandex.net> In-Reply-To: <1146471551107995@myt6-2fee75662a4f.qloud-c.yandex.net> Reply-To: paulk@asert.com.au From: Paul King Date: Tue, 26 Feb 2019 07:23:43 +1000 Message-ID: Subject: Re: GroovyDoc classloader issue To: users@groovy.apache.org Content-Type: multipart/alternative; boundary="000000000000aa52270582be8e4f" --000000000000aa52270582be8e4f Content-Type: text/plain; charset="UTF-8" Hi Alexey, the attachment came through. I just haven't had time to test it yet. Thanks! Cheers, Paul. On Tue, Feb 26, 2019 at 1:20 AM Alexey Belostotskiy wrote: > Hi, did you receive the last email (with test in attachment)? I'm not sure > if it was sent properly. > > 20.02.2019, 17:34, "Alexey Belostotskiy" : > > Hi, it's kind of messy, but I hope you'll get the idea. > > 19.02.2019, 23:48, "Paul King" : > > Our preference would be to have a standalone testcase that triggers your > problem. Are you in a position to create such a test? > > On Wed, Feb 20, 2019 at 1:24 AM Alexey Belostotskiy > wrote: > > Hello, > > We're generating groovydocs in runtime in our app. We use groovydoc as a > library, not standalone tool. > > It mostly works, but we're experiencing issues with some classes ending up > unresolved. I found out that this happens because SimpleGroovyClassDoc is > calling its getClass().getClassLoader() to get classloader for class > resolution. But in our case, most of classes that we want to link should be > loaded via different classloader. > > Basically, solution that would work for us, is to replace > getClass().getClassLoader() calls in SimpleGroovyClassDoc with > Thread.currentThread().getContextClassLoader(), but that might be a > breaking change. > > I'm not sure what the process is for requesting such changes and whether > it's something that Groovy team is willing to implement. > > --000000000000aa52270582be8e4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Alexey, the attachment came through. I just haven't= had time to test=C2=A0it yet. Thanks!

Cheers, Paul.

On Tue, Feb 26, 2019 at 1:20 AM Alexey Belostotskiy <lexek-92@ya.ru> wrote:
Hi, did you receive the last email (w= ith test in attachment)? I'm not sure if it was sent properly.
=C2=A0
20.02.2019, 17:34, "Alexey Belostotskiy" <<= a href=3D"mailto:lexek-92@ya.ru" target=3D"_blank">lexek-92@ya.ru>:<= /div>
Hi, it's kind of messy, but I hope = you'll get the idea.
=C2=A0
19.02.2019, 23:48, &quo= t;Paul King" <paulk@asert.com.au>:
Our preference would be to have a standalone testcase t= hat triggers your problem. Are you in a position to create such a test?=C2=A0
On Wed, Feb 20, 2019 at 1:24 AM Alexey Belostotskiy <<= a rel=3D"noopener noreferrer" href=3D"mailto:lexek-92@ya.ru" target=3D"_bla= nk">lexek-92@ya.ru> wrote:
Hel= lo,
=C2=A0
We're generating groovydocs in runtime i= n our app. We use groovydoc as a library, not standalone tool.
= =C2=A0
It mostly works, but we're experiencing issues with so= me classes ending up unresolved. I found out that this happens because SimpleGroovyClass= Doc is calling its getClass().getClassLoader() to get classloader for clas= s resolution. But in our case, most of classes that we want to link should = be loaded via different classloader.
=C2=A0
Basically, = solution that would work for us, is to replace getClass().getClassLoader() calls = in SimpleGroo= vyClassDoc with Thread.currentThread().getContextClassLoader(), but that m= ight be a breaking change.
=C2=A0
I'm not sure what= the process is for requesting such changes and whether it's something = that Groovy team is willing to implement.
--000000000000aa52270582be8e4f--