Thanks for this info and work! A couple relevant notes: - There is a #beam-intellij slack channel where I tried to collect some info a few weeks ago when I was debugging IntelliJ issues - I tried to figure out where IntelliJ stores the info about the vendored JARs we manually add to various modules, so we could automate adding them, but failed so far. - afaict it is not in the .idea directory in the project; I'm not sure where it goes - I had some early exchanges on YouTrack with JetBrains folks about specific issues and possibly opening the Gradle plugin to outside contributors, but haven't heard anything back in a few months: - IDEA-195908 <https://youtrack.jetbrains.com/issue/IDEA-195908>: project import gets corrupted when certain libraries are present in the local Maven cache (~/.m2) - IDEA-197980 <https://youtrack.jetbrains.com/issue/IDEA-197980>: intellij doesn't understand vendored classes (while the CLI does) - IDEA-198150 <https://youtrack.jetbrains.com/issue/IDEA-198150>: can the Gradle plugin be open-sourced?
On Tue, Oct 16, 2018 at 12:45 PM Scott Wegner <sc...@apache.org> wrote: > FYI, I've opened BEAM-5762 to track the work to document and improve > IntelliJ integration. It's broken down into sub-tasks for documenting > individual scenarios. I've grabbed a couple; if you're feeling motivated > feel free to grab one or two to help out! > > https://issues.apache.org/jira/browse/BEAM-5762 Improve IntelliJ support > and documentation > > > On Wed, Oct 10, 2018 at 12:16 PM Rui Wang <ruw...@google.com> wrote: > >> I left my tips to run *Java* unit tests in Intellij (work for me all the >> time). I assumed that people mostly use intellij for Java development. >> >> If there are some cases when people use Intellij to develop other >> languages (maybe because of the power of plugins?), we might need to create >> separate sessions for those cases. >> >> -Rui >> >> On Wed, Oct 10, 2018 at 11:46 AM Scott Wegner <sc...@apache.org> wrote: >> >>> Last week I migrated all previous content from the website into wiki >>> pages for IntelliJ [1] and Eclipse [2] (thanks Thomas Weise for the >>> pointers). >>> >>> The next step is to incorporate all the tips that people have mentioned >>> here and fill in any other gaps we have. Here's how I'd like to get started: >>> >>> 1) Focus on IntelliJ first. I don't use Eclipse and I don't have the >>> expertise to make this experience great. I'd be glad if somebody else >>> picked this up. >>> 2) Re-organize the wiki page into a set of high-level developer tasks >>> that we support; things like "Setting up IntelliJ IDE from scratch", >>> "Performing a full build", "Building a testing a single module", "Running a >>> single unit test", "Running an IT for a particular runner", "Recovering >>> from project corruption", "Common errors" >>> 3) Work on one section at a time, filling in step-by-step instructions >>> that are prescriptive and easy to validate. >>> >>> And I'd love some help! Here's what you could do to help: >>> >>> * Respond to this email with any high-level "developer scenarios" that >>> I've forgotten above. Things that you should be able to do in an IDE and we >>> should document for all contributors. >>> * Add your tips and work-arounds; I'll be collecting as much as I can in >>> this working doc before organizing it into the wiki: >>> https://docs.google.com/document/d/18eXrO9IYll4oOnFb53EBhOtIfx-JLOinTWZSIBFkLk4/edit# >>> * Write wiki documentation for one of the scenarios listed above. Let us >>> know which you'll be working on so we don't duplicate work. >>> >>> [1] https://cwiki.apache.org/confluence/display/BEAM/IntelliJ+Tips >>> [2] https://cwiki.apache.org/confluence/display/BEAM/Eclipse+Tips >>> >>> On Thu, Oct 4, 2018 at 7:43 AM Maximilian Michels <m...@apache.org> >>> wrote: >>> >>>> Yes, you need to manually add the vendor JAR to the modules where it is >>>> missing. AFAIK there is no automatic solution. >>>> >>>> On 04.10.18 16:34, Thomas Weise wrote: >>>> > Was anyone successful making Intellij understand the dependency >>>> > vendoring and not display as unresolvable symbols? >>>> > >>>> > >>>> > On Thu, Oct 4, 2018 at 6:13 AM Maximilian Michels <m...@apache.org >>>> > <mailto:m...@apache.org>> wrote: >>>> > >>>> > That's fine, I think we have accepted the fact that IntelliJ only >>>> works >>>> > with delegating the build to Gradle instead of using its built-in >>>> > Gradle >>>> > support. That comes with a bunch of drawbacks, i.e. slow >>>> build/test >>>> > execution. >>>> > >>>> > > 4. the current gradle setup still requires some knowledge about >>>> > the setup (like for validates runners which are not "just tests") >>>> > and there is no trivial way to make the IDE aware of it until you >>>> > generate the IDE files (.idea >>>> > The ValidatesRunner tests are not part of the IntelliJ setup. >>>> These are >>>> > additional integration test which are part of Gradle but can't be >>>> > programmatically called from within IntelliJ. >>>> > >>>> > On 04.10.18 14:59, Romain Manni-Bucau wrote: >>>> > > >>>> > > >>>> > > >>>> > > Le jeu. 4 oct. 2018 à 14:53, Maximilian Michels < >>>> m...@apache.org >>>> > <mailto:m...@apache.org> >>>> > > <mailto:m...@apache.org <mailto:m...@apache.org>>> a écrit : >>>> > > >>>> > > > We have some hints in the gradle files that used to >>>> allow a >>>> > > smooth import with no extra steps*. Have the hints gotten >>>> out of >>>> > > date or are there new hints we can put in that might help? >>>> > > >>>> > > If you're referring to the `gradle idea` task which >>>> generates >>>> > IntelliJ >>>> > > IPR files, that doesn't work anymore. The build is way too >>>> > involved for >>>> > > that too work. We've since removed this from the contribute >>>> > guide. >>>> > > >>>> > > There is still the IntelliJ tips page which describes a >>>> different >>>> > > (non-working) procedure. In the end, you have to fiddle >>>> with the >>>> > > project >>>> > > setup, i.e. adding the vendor JAR to the classpath where >>>> > necessary. But >>>> > > it breaks as soon as your refresh the Gradle project. >>>> > > >>>> > > Romain, can you really get it to work out of the box with >>>> > your method? >>>> > > If so, I'd like to contact you for information to update >>>> the >>>> > > IntelliJ page. >>>> > > >>>> > > >>>> > > Yep, worked at least last time I tried. I didn't played much >>>> with >>>> > it but >>>> > > I assume it is reproducible. Feel free to ping me on slack. >>>> > > >>>> > > >>>> > > Note, this is not the first conversation, so we should >>>> really >>>> > fix the >>>> > > instructions/describe the workarounds. See also >>>> > > >>>> > >>>> https://lists.apache.org/thread.html/c8323622e5de92089ebdfecee09a0e37cae0c631e1bebf06ed9f2bc6@%3Cdev.beam.apache.org%3E >>>> > > >>>> > > >>>> > > The small warn here is that, by design, you will not fix them >>>> all >>>> > since: >>>> > > >>>> > > 1. the IDE must run the script to import the project (which is >>>> a big >>>> > > drawback compared to maven where it can be imported without >>>> > running any >>>> > > project code). This small phase easily breaks if you need >>>> > anything from >>>> > > the env and beam requires some setup. >>>> > > 2. the script defines a lifecycle the IDE can't respect today >>>> > cause it >>>> > > is coded and not always guessable enough >>>> > > 3. running tests in the IDE requires to use the launcher which >>>> > rebuilds >>>> > > the whole project model before executing anything which is slow >>>> > compared >>>> > > to IDE default launcher which is way better and the one used my >>>> > most dev >>>> > > 4. the current gradle setup still requires some knowledge >>>> about the >>>> > > setup (like for validates runners which are not "just tests") >>>> and >>>> > there >>>> > > is no trivial way to make the IDE aware of it until you >>>> generate >>>> > the IDE >>>> > > files (.idea) >>>> > > >>>> > > On 01.10.18 23:32, Romain Manni-Bucau wrote: >>>> > > > Personally i drop all caches - idea + ivy + maven beam >>>> folder, >>>> > > build in >>>> > > > console skipping test execution - important cause idea >>>> is not >>>> > > able to >>>> > > > import the project without a correctly ran gradle setup >>>> and a >>>> > > failure >>>> > > > can corrupt later imports, then I kill gradle daemon and >>>> > finally >>>> > > import >>>> > > > beam in idea using the wrapper. >>>> > > > >>>> > > > As it has been mentionned you will have to run tests >>>> using >>>> > gradle >>>> > > > wrapper due to current gradle setup which slows down a >>>> lot the >>>> > > execution >>>> > > > compared to native idea one but at least it will run and >>>> > you can >>>> > > debug >>>> > > > normally. >>>> > > > >>>> > > > Le lun. 1 oct. 2018 22:38, Kenneth Knowles >>>> > <k...@apache.org <mailto:k...@apache.org> >>>> > > <mailto:k...@apache.org <mailto:k...@apache.org>> >>>> > > > <mailto:k...@apache.org <mailto:k...@apache.org> >>>> > <mailto:k...@apache.org <mailto:k...@apache.org>>>> a écrit : >>>> > > > >>>> > > > We have some hints in the gradle files that used to >>>> > allow a >>>> > > smooth >>>> > > > import with no extra steps*. Have the hints gotten >>>> out >>>> > of date or >>>> > > > are there new hints we can put in that might help? >>>> > > > >>>> > > > Kenn >>>> > > > >>>> > > > *anyhow at least for a week or two for a couple of >>>> > people :-) >>>> > > > >>>> > > > On Mon, Oct 1, 2018 at 1:26 PM Ismaël Mejía >>>> > > <ieme...@gmail.com <mailto:ieme...@gmail.com> >>>> > <mailto:ieme...@gmail.com <mailto:ieme...@gmail.com>> >>>> > > > <mailto:ieme...@gmail.com <mailto:ieme...@gmail.com >>>> > >>>> > <mailto:ieme...@gmail.com <mailto:ieme...@gmail.com>>>> wrote: >>>> > > > >>>> > > > Hello Alex, >>>> > > > >>>> > > > I understand your pain and thanks for bringing >>>> this >>>> > > subject, I also >>>> > > > have found many issues in the process to the >>>> point of >>>> > > believing >>>> > > > recently that it is undeterministic. >>>> > > > Last time I followed the process ~3 weeks ago. I >>>> > had to >>>> > > clean up all >>>> > > > caches (both remove the intelliJ temp files and >>>> the >>>> > > gradle cache >>>> > > > files) and also I had to refresh the project in >>>> > IntelliJ's >>>> > > > gradle tool >>>> > > > windows view after the initial import at least >>>> 2 times >>>> > > until it >>>> > > > finally worked. Also remember that 2018.2 is not >>>> > supported as >>>> > > > reported >>>> > > > by Ryan some weeks ago (not sure if already >>>> fixed). >>>> > > > >>>> > > > Probably there was something corrupted in my >>>> setup >>>> > but I >>>> > > have heard >>>> > > > similar stories of at least 2 more people. >>>> > > > I really don't know how we can improve the >>>> current >>>> > status quo >>>> > > > apart of >>>> > > > contacting the IntelliJ guys but I am concerned >>>> on how >>>> > > this can >>>> > > > be an >>>> > > > issue for new contributors. >>>> > > > >>>> > > > On Mon, Oct 1, 2018 at 8:47 PM Rui Wang >>>> > > <ruw...@google.com <mailto:ruw...@google.com> >>>> > <mailto:ruw...@google.com <mailto:ruw...@google.com>> >>>> > > > <mailto:ruw...@google.com >>>> > <mailto:ruw...@google.com> <mailto:ruw...@google.com >>>> > <mailto:ruw...@google.com>>>> wrote: >>>> > > > > >>>> > > > > Hi Alex, >>>> > > > > >>>> > > > > I had troubles when importing JAVA SDK to >>>> > intellij at the >>>> > > > beginning. >>>> > > > > >>>> > > > > Besides what the instruction says, some extra >>>> > steps that >>>> > > > might help: >>>> > > > > 1. Preferences/Settings > Build, Execution, >>>> > Deployment > >>>> > > > Build Tools > Gradle > Runner, choose Gradle >>>> Test >>>> > Runner >>>> > > in the >>>> > > > dropdown menu. >>>> > > > > 2. Enable annotation processor. >>>> > > > > >>>> > > > > -Rui >>>> > > > > >>>> > > > > On Mon, Oct 1, 2018 at 11:33 AM Jean-Baptiste >>>> > Onofré >>>> > > > <j...@nanthrax.net <mailto:j...@nanthrax.net> >>>> > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>> >>>> > > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net> >>>> > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>>> wrote: >>>> > > > >> >>>> > > > >> Hi Alex, >>>> > > > >> >>>> > > > >> After a git clean -fdx (removing all IDEA >>>> > resources), >>>> > > I just >>>> > > > open the >>>> > > > >> folder in IntelliJ and it imports the >>>> project. >>>> > > > >> >>>> > > > >> It works fine so far (NB: I don't build >>>> using >>>> > > IntelliJ, it's >>>> > > > mostly an >>>> > > > >> editor for me, I use the command line for >>>> any >>>> > other stuff >>>> > > > like git, >>>> > > > >> gradle, ...). >>>> > > > >> >>>> > > > >> Regards >>>> > > > >> JB >>>> > > > >> >>>> > > > >> On 01/10/2018 20:05, Alex Amato wrote: >>>> > > > >> > Hello, >>>> > > > >> > >>>> > > > >> > I'm looking to get a good intellij setup >>>> working >>>> > > and then >>>> > > > update the >>>> > > > >> > documentation how to build and test the >>>> java >>>> > SDK with >>>> > > > intelliJ. >>>> > > > >> > >>>> > > > >> > Does anyone have a good setup working, >>>> with some >>>> > > tips? I >>>> > > > followed our >>>> > > > >> > instructions here, but I found that after >>>> > following >>>> > > these >>>> > > > steps I could >>>> > > > >> > not build or test the project. It seemed >>>> > like the build >>>> > > > button did >>>> > > > >> > nothing and the test buttons did not >>>> appear. >>>> > > > >> > >>>> https://beam.apache.org/contribute/intellij/ >>>> > > > >> > >>>> > > > >> > I'm also curious about the gradle support >>>> for >>>> > > generating >>>> > > > intelliJ >>>> > > > >> > projects. Has anyone tried this as well? >>>> > > > >> > >>>> > > > >> > Any tips would be appreciated. >>>> > > > >> > Thank you, >>>> > > > >> > Alex >>>> > > > >> >>>> > > > >> -- >>>> > > > >> Jean-Baptiste Onofré >>>> > > > >> jbono...@apache.org >>>> > <mailto:jbono...@apache.org> <mailto:jbono...@apache.org >>>> > <mailto:jbono...@apache.org>> >>>> > > <mailto:jbono...@apache.org <mailto:jbono...@apache.org> >>>> > <mailto:jbono...@apache.org <mailto:jbono...@apache.org>>> >>>> > > > >> http://blog.nanthrax.net >>>> > > > >> Talend - http://www.talend.com >>>> > > > >>>> > > >>>> > >>>> >>> >>> >>> -- >>> >>> >>> >>> >>> Got feedback? tinyurl.com/swegner-feedback >>> >> > > -- > > > > > Got feedback? tinyurl.com/swegner-feedback >