I think there is an expectation that changes do not break the IDE as well.
Since this is a big enough pain for everyone, I think we need to do
something that fixes this issue ASAP.

Below is yet another hack that works around the issue, by telling intellij
that everything is production source code and not test sources. This means
you can't filter your searches to production code, but it does fix the
editor and it won't affect the command line build. I can check this in for
the short term while y'all work on restructuring the code if you like.

diff --git a/gradle/ide.gradle b/gradle/ide.gradle
index a8ea46d91..09541a07f 100644
--- a/gradle/ide.gradle
+++ b/gradle/ide.gradle
@@ -76,6 +76,7 @@ subprojects {
   idea {
     module {
       downloadSources = true
+      testSourceDirs = Collections.emptySet()
     }
   }
 }


On Wed, Jul 18, 2018 at 3:58 PM, Jacob Barrett <jbarr...@pivotal.io> wrote:

> To be clear this and editor issue not a compiler issue. Do not
> accidentally check any Gradle hacks in. To fix this someone needs to move
> framework code out of the test sources.
>
> > On Jul 18, 2018, at 3:08 PM, Jinmei Liao <jil...@pivotal.io> wrote:
> >
> > With Jake's merge, the my integration/distributed tests in geode-cq (and
> > maybe all other non-core modules) are not compiling nicely in IDEA. If
> you
> > want a quick fix to your IDEA issue and not waiting till all the test
> > refactors are done, you can add these lines in the beginning of that
> > modules build.gradle's dependency section:
> >
> > integrationTestCompile files(project(':geode-core').
> buildDir.absolutePath+
> > "/../out/test/classes")
> >
> > distributedTestCompile
> > files(project(':geode-core').buildDir.absolutePath+"/../
> out/test/classes")
> >
> > Simply a hack to get IDEA not complaining.
> >
> >
> >
> >> On Wed, Jul 18, 2018 at 2:08 PM Jacob Barrett <jbarr...@pivotal.io>
> wrote:
> >>
> >> Even maven won’t fix the issue remain in IJ. We need to refactor the
> code
> >> so that Test code does not depend on Test code. It’s just bad form to
> do so.
> >>
> >> -Jake
> >>
> >>
> >>> On Jul 18, 2018, at 1:28 PM, Kirk Lund <kl...@apache.org> wrote:
> >>>
> >>> Sai had attempted to extract our testing framework(s) including DUnit
> to
> >> a
> >>> new geode-test module. I thought it had been merged to develop but it
> >> seems
> >>> to have been reverted. Anyone know why it had to be reverted?
> >>>
> >>> Other than moving to maven, another option would be to separate test
> >> types
> >>> based on file name: *IntegrationTest, *DistributedTest, *Test
> >>> (excluding *IntegrationTest,
> >>> *DistributedTest). It's perhaps not as elegant as separate srcSets but
> at
> >>> least Gradle and the IJ plugin can handle it properly.
> >>>
> >>>> On Wed, Jul 18, 2018 at 1:11 PM, Jacob Barrett <jbarr...@pivotal.io>
> >> wrote:
> >>>>
> >>>> The fix has been merged. It only fixes the compilation from IJ. The
> >> editor
> >>>> will continue to colorize dependencies from other test sources as
> >> missing.
> >>>> This can only be fixed by completing the extraction of the test
> >> framework
> >>>> sources into their own module. IJ editor assumes that test code should
> >>>> never depend on test code, which is a correct assumption but causes
> >> issues
> >>>> for us. We need to extract framework code into its own module as main
> >>>> source so that we can fix our gradle dependencies and correct this IJ
> >>>> issue.
> >>>>
> >>>> Are there any takers interested in extracting DUnit and other
> framework
> >>>> sources into their own modules?
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Wed, Jul 18, 2018 at 12:18 PM Jacob Barrett <jbarr...@pivotal.io>
> >>>> wrote:
> >>>>
> >>>>> All,
> >>>>>
> >>>>> I have a fix that appears to address all these issue in a PR. I am
> just
> >>>>> waiting for them to pass come CI because they effect the Gradle build
> >>>> too.
> >>>>> Please don’t check in any “fixes” to this IJ integration issue.
> >>>>>
> >>>>> -Jake
> >>>>>
> >>>>>
> >>>>>> On Jul 18, 2018, at 10:54 AM, Kirk Lund <kl...@apache.org> wrote:
> >>>>>>
> >>>>>> More details: If I open up BasicDistributedTest, I can run it but
> all
> >>>> of
> >>>>>> the imports for classes that are also in distributedTest are RED and
> >>>>> don't
> >>>>>> show up in the Project window.
> >>>>>>
> >>>>>> After pulling, the following commit is now my head revision.
> >>>>> Unfortunately,
> >>>>>> it doesn't fix my problem. But it did cause one change: If I search
> >>>>>> for BasicDistributedTest,
> >>>>>> it now finds two instances -- one is found in
> >>>> geode-core_distributedTest
> >>>>>> and the other is found in geode-core_test.
> >>>>>>
> >>>>>> commit 47932e85cc7dc76aa00a667552d1c0fc3fe52b85 (*HEAD ->
> **develop*,
> >>>>>> *origin/develop*)
> >>>>>>
> >>>>>> Author: Jinmei Liao <jil...@pivotal.io>
> >>>>>>
> >>>>>> Date:   Wed Jul 18 10:22:16 2018 -0700
> >>>>>>
> >>>>>>
> >>>>>>  GEODE-5363: Fixes issue with build in IJ IDEA.
> >>>>>>
> >>>>>>
> >>>>>>> On Wed, Jul 18, 2018 at 10:29 AM, Kirk Lund <kl...@apache.org>
> >> wrote:
> >>>>>>>
> >>>>>>> Yes, my head revision is...
> >>>>>>>
> >>>>>>> commit afc8dc8fca846d08581d8027f969ceadec911687 (*HEAD ->
> **develop*,
> >>>>>>> *origin/develop*, *origin/HEAD*)
> >>>>>>>
> >>>>>>> Author: Anthony Baker <aba...@apache.org>
> >>>>>>>
> >>>>>>> Date:   Mon Jul 16 16:56:03 2018 -0700
> >>>>>>>
> >>>>>>>
> >>>>>>>  GEODE-5421 Updated dependencies
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>  Updated bundled library dependencies. The updated libaries are:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>  HikariCP 3.0.0 -> 3.2.0
> >>>>>>>
> >>>>>>>  fast-classpath-scanner 2.19.0 -> 2.21
> >>>>>>>
> >>>>>>>  fastutil 8.1.1 -> 8.2.1
> >>>>>>>
> >>>>>>>  google-gson 2.8.2 -> 2.8.5
> >>>>>>>
> >>>>>>>  guava 24.1-jre -> 25.1-jre
> >>>>>>>
> >>>>>>>  jackson 2.9.5 -> 2.9.6
> >>>>>>>
> >>>>>>>  jansi 1.17 -> 1.17.1
> >>>>>>>
> >>>>>>>  netty 4.1.21.Final -> 4.1.27.Final
> >>>>>>>
> >>>>>>>  protobuf 3.5.1 -> 3.6.0
> >>>>>>>
> >>>>>>>  spring-security 4.2.4 -> 4.2.7
> >>>>>>>
> >>>>>>>  spring-* 4.3.14 -> 4.3.18
> >>>>>>>
> >>>>>>>  springfox 2.8.0 -> 2.9.2
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>  These changes mean that javassist and reflections are no longer
> >>>>>>>
> >>>>>>>  bundled with the binary convenience distributions.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> On Wed, Jul 18, 2018 at 10:23 AM, Anthony Baker <
> aba...@pivotal.io>
> >>>>> wrote:
> >>>>>>>>
> >>>>>>>> Are you using this commit?
> >>>>>>>>
> >>>>>>>> commit 89754953080cf3da9ce02a644bd3c0ac9afa1990
> >>>>>>>> Author: Jacob Barrett <jbarr...@pivotal.io>
> >>>>>>>> Date:   Tue Jul 17 17:03:22 2018 -0700
> >>>>>>>>
> >>>>>>>>  GEODE-5363: Fixes issue with build in IJ IDEA.
> >>>>>>>>
> >>>>>>>>  - Splits up LuceneTestUtilities to removed duplication and
> compile
> >>>>>>>> fail.
> >>>>>>>>
> >>>>>>>> Anthony
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>> On Jul 18, 2018, at 9:55 AM, Kirk Lund <kl...@apache.org> wrote:
> >>>>>>>>>
> >>>>>>>>> Does anyone have any instructions on setting up IntelliJ with the
> >>>>> latest
> >>>>>>>>> changes? I’ve tried new project from sources and I’ve tried using
> >>>>>>>> ./gradlew
> >>>>>>>>> idea — neither works for me. Basically all non-unit tests end up
> >> not
> >>>>>>>> being
> >>>>>>>>> a source set.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>
> >>>>
> >>
> >
> >
> > --
> > Cheers
> >
> > Jinmei
>

Reply via email to