From dev-return-30470-archive-asf-public=cust-asf.ponee.io@geode.apache.org Mon Dec 17 21:26:02 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 79A9F180652 for ; Mon, 17 Dec 2018 21:26:01 +0100 (CET) Received: (qmail 38583 invoked by uid 500); 17 Dec 2018 20:26:00 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 38572 invoked by uid 99); 17 Dec 2018 20:26:00 -0000 Received: from mail-relay.apache.org (HELO mailrelay1-lw-us.apache.org) (207.244.88.152) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2018 20:26:00 +0000 Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id 8E6CD1048 for ; Mon, 17 Dec 2018 20:25:59 +0000 (UTC) Received: by mail-ot1-f69.google.com with SMTP id t13so8187522otk.4 for ; Mon, 17 Dec 2018 12:25:59 -0800 (PST) X-Gm-Message-State: AA+aEWbrRGhPnohxruAHRT24VB7izIQFza3eaZwN2y7XfSJR2YnIbORj 5GyJEqH805/8bNUVQt9TtBW8U4oW/D0zbIU+68HGbj/2r02h0wJnSFWEvT0RsJN06gPXubgELO/ f0RJzwxUKZziZDFSzop1q3zjkeNLbc2L2ey2qDcdWW8TtuxP2E37bLiA= X-Received: by 2002:aca:a897:: with SMTP id r145mr6504769oie.253.1545078358750; Mon, 17 Dec 2018 12:25:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/UT3lJ8ol0wG4KJkfchyx8SI1Zknlm6FCLoyEQWivKpTYJicT2CdfktkQXolsu82jorPrY68+EtZkUVyrtMrNw= X-Received: by 2002:aca:a897:: with SMTP id r145mr6504763oie.253.1545078358613; Mon, 17 Dec 2018 12:25:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kirk Lund Date: Mon, 17 Dec 2018 12:25:47 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Two copies of ExtendsFunctionAdapter.java To: geode Content-Type: multipart/alternative; boundary="000000000000b74208057d3d96fc" --000000000000b74208057d3d96fc Content-Type: text/plain; charset="UTF-8" You're right. IntelliJ shouldn't be compiling these classes. However, the real issue here is that our use of Gradle is so horribly unnatural that it ends up confusing IntelliJ (and other tools). We should strive to NOT confuse other tools by doing stupid stuff in Gradle. You've seen my instructions for configuring IJ and setting up a project (or I assume you have). I'm still following that for every Geode project I setup. Sometimes, one of these projects "misbehaves" and gets so confused by Geode's crazy Gradle build that it goes belly-up. The result is we are wasting the time of lots of developers because of this kind of non-sense. So, I ask again: do we really need two copies of the same file? On Mon, Dec 17, 2018 at 11:49 AM Galen O'Sullivan wrote: > I don't understand our build or IntelliJ that well, but it seems weird to > me that these classes would be getting built at all since they're in the > resources section rather than java. I don't see compiled versions of these > classes in my geode directory. Perhaps it's an IntelliJ configuration > issue? > > Galen > > > On Mon, Dec 17, 2018 at 11:23 AM Kirk Lund wrote: > > > IntelliJ just started failing to compile because we have two copies of > > ExtendsFunctionAdapter.java. Apparently, IJ was happy enough to ignore > > these duplicates for a month or so, but it's now fed up and will no > longer > > tolerate the duplication so it's failing with: > > > > Error:(21, 8) java: duplicate class: > > org.apache.geode.management.internal.deployment.ExtendsFunctionAdapter > > > > This file is in geode-core/src/distributedTest/resources and > > geode-core/src/integrationTest/resources: > > > > 1) > > > > > ./geode-core/src/distributedTest/resources/org/apache/geode/management/internal/deployment/ExtendsFunctionAdapter.java > > 2) > > > > > ./geode-core/src/integrationTest/resources/org/apache/geode/management/internal/deployment/ExtendsFunctionAdapter.java > > > > Apparently we have two tests that load these java files as resources: > > > > 1) > > > > > geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/DeployCommandFunctionRegistrationDUnitTest.java:83: > > > > > > > "/org/apache/geode/management/internal/deployment/ExtendsFunctionAdapter.java"); > > 2.a) > > > > > geode-core/src/integrationTest/java/org/apache/geode/management/internal/deployment/FunctionScannerTest.java:62: > > File sourceFileOne = loadTestResource("ExtendsFunctionAdapter.java"); > > 2.b) > > > > > geode-core/src/integrationTest/java/org/apache/geode/management/internal/deployment/FunctionScannerTest.java:73: > > File sourceFileOne = > > loadTestResource("AbstractExtendsFunctionAdapter.java"); > > 2.c) > > > > > geode-core/src/integrationTest/java/org/apache/geode/management/internal/deployment/FunctionScannerTest.java:74: > > File sourceFileTwo = > > loadTestResource("ConcreteExtendsAbstractExtendsFunctionAdapter.java"); > > > > Do we really need to have two copies of this file in our codebase? > > > > PS, here's the last commit to touch these two files: > > > > commit 65c79841b65d7bd9ffa3c50fa73d4d3857dced58 > > > > Author: Jacob Barrett > > > > Date: Fri Aug 10 15:49:22 2018 -0700 > > > > > > GEODE-5530: Removes test dependency from other test source sets > > (#2294) > > > > > > > > Moves common sources to geode-dunit or geode-junit. > > > > > > > > Co-authored-by: Finn Sutherland > > > > Thanks, > > Kirk > > > --000000000000b74208057d3d96fc--