Re: Documentation for IDE setup
That was the compilation error I got with Eclipse too. Thanks for sorting it out. On 10/17/16, Daniel Kulpwrote: > Just a follow up based on some discoveries while trying to rebase my branch > on master this morning. > > Eclipse JDT outputs methods/fields into class files in a different order > than Oracle compiler. That’s perfectly acceptable from a “binary > compatibility” standpoint, but it has a side effect of causing potential > problems with AutoValue. If the AutoValue class tries to get it’s values > from an interface, the methods on the interface will come in a different > order than with Oracle and the resulting constructor/fields/etc… will be > different. Based on some experiments and back and forth with Dan H., I > believe the best fix is to explicitly define the properties on the AutoValue > class as if it didn’t pull those via the interface. Thus, the APT > processing gets the attributes in the order intended and generates the right > code. The alternative would be to use the Builder pattern instead of the > constructor, but that requires more code to be written than just defining > the attributes in the right order. However, if you are already defining a > Builder, that might be the best option. > > Anyway, something to be aware of when using the AutoValue things. Once we > get the branch merged, travis should automatically pick this up. > > Dan > > > > >> On Oct 14, 2016, at 11:37 AM, Daniel Kulp wrote: >> >> >>> On Oct 14, 2016, at 10:06 AM, Jesse Anderson >>> wrote: >>> >>> Last week I imported Beam with IntelliJ and everything worked. >>> >>> That said, I tried to import the Eclipse project and that doesn't >>> compile >>> anymore. I didn't have time to figure out what happened though. >>> >> >> I have a pull request https://github.com/apache/incubator-beam/pull/1094 >> that fixes the compile issues. It has two LGTM’s, just needs someone to >> merge it. >> >> With eclipse, you need to have all the needed m2e connectors. Some of >> them (find bugs, check style) can be auto-detected and installed when beam >> is first imported. The apt one doesn’t. You need to go to the eclipse >> marketplace, install it, then configure it in the Eclipse properties to >> turn on the “experimental” m2e-apt processing. Once you do that, a >> refresh of the maven projects should result in it building/compiling. >> >> Running tests is another matter. Since eclipse compiles everything in a >> module in one pass (instead of two like maven), one of the apt processors >> doesn’t know where to output files and always dumps the files in /classes >> instead of /test-classes. Thus, any test that relies on a runner will >> likely fail as it results in the “test” versions of various services from >> core being picked up. A simple: >> >> rm sdks/java/core/target/classes/META-INF/services/* >> >> From the command line will fix that. That should also be documented on >> the IDE page until someone can figure out how to work around it. >> >> Dan >> >> >> >>> On Fri, Oct 14, 2016 at 1:21 AM Jean-Baptiste Onofré >>> wrote: >>> Hi Christian, IntelliJ doesn't need any special config (maybe the code style can be documented or imported). Anyway, agree to add such on website in the contribute directory. I think it could be part of the contribution-guide as it's first setup step. Regards JB On 10/14/2016 10:17 AM, Christian Schneider wrote: > Hello all, > > I am new to the beam community and currently start making myself > familiar with the code. I quickly found the contribution guide and > was > able to clone the code and build beam using maven. > > The first obstacle I faced was getting the code build in eclipse. I > naively imported as existing maven projects but got lots of compile > errors. After talking to Dan Kulp we found that this is due to the apt > annotation processing for auto value types. Dan explained me how I > need > to setup eclipse to make it work. > > I still got 5 compile errors (Some bound mismatch at Read.bounded, and > one ambiguous method empty). These errors seem to be present for > everyone using eclipse and Dan works on it. So I think this is not a > permanent problem. > > To make it easier for new people I would like to write a documentation > about the IDE setup. I can cover the eclipse part but I think intellij > should also be described. > > I already started with it and placed it in /contribute/ide-setup. Does > that make sense? > > I currently did not link to it from anywhere. I think it should be > linked in the contribute/index and in the Contribute menu. > > Christian > -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend -
Re: Documentation for IDE setup
Just a follow up based on some discoveries while trying to rebase my branch on master this morning. Eclipse JDT outputs methods/fields into class files in a different order than Oracle compiler. That’s perfectly acceptable from a “binary compatibility” standpoint, but it has a side effect of causing potential problems with AutoValue. If the AutoValue class tries to get it’s values from an interface, the methods on the interface will come in a different order than with Oracle and the resulting constructor/fields/etc… will be different. Based on some experiments and back and forth with Dan H., I believe the best fix is to explicitly define the properties on the AutoValue class as if it didn’t pull those via the interface. Thus, the APT processing gets the attributes in the order intended and generates the right code. The alternative would be to use the Builder pattern instead of the constructor, but that requires more code to be written than just defining the attributes in the right order. However, if you are already defining a Builder, that might be the best option. Anyway, something to be aware of when using the AutoValue things. Once we get the branch merged, travis should automatically pick this up. Dan > On Oct 14, 2016, at 11:37 AM, Daniel Kulpwrote: > > >> On Oct 14, 2016, at 10:06 AM, Jesse Anderson wrote: >> >> Last week I imported Beam with IntelliJ and everything worked. >> >> That said, I tried to import the Eclipse project and that doesn't compile >> anymore. I didn't have time to figure out what happened though. >> > > I have a pull request https://github.com/apache/incubator-beam/pull/1094 that > fixes the compile issues. It has two LGTM’s, just needs someone to merge it. > > With eclipse, you need to have all the needed m2e connectors. Some of them > (find bugs, check style) can be auto-detected and installed when beam is > first imported. The apt one doesn’t. You need to go to the eclipse > marketplace, install it, then configure it in the Eclipse properties to turn > on the “experimental” m2e-apt processing. Once you do that, a refresh of > the maven projects should result in it building/compiling. > > Running tests is another matter. Since eclipse compiles everything in a > module in one pass (instead of two like maven), one of the apt processors > doesn’t know where to output files and always dumps the files in /classes > instead of /test-classes. Thus, any test that relies on a runner will > likely fail as it results in the “test” versions of various services from > core being picked up. A simple: > > rm sdks/java/core/target/classes/META-INF/services/* > > From the command line will fix that. That should also be documented on the > IDE page until someone can figure out how to work around it. > > Dan > > > >> On Fri, Oct 14, 2016 at 1:21 AM Jean-Baptiste Onofré >> wrote: >> >>> Hi Christian, >>> >>> IntelliJ doesn't need any special config (maybe the code style can be >>> documented or imported). >>> >>> Anyway, agree to add such on website in the contribute directory. I >>> think it could be part of the contribution-guide as it's first setup step. >>> >>> Regards >>> JB >>> >>> On 10/14/2016 10:17 AM, Christian Schneider wrote: Hello all, I am new to the beam community and currently start making myself familiar with the code. I quickly found the contribution guide and was able to clone the code and build beam using maven. The first obstacle I faced was getting the code build in eclipse. I naively imported as existing maven projects but got lots of compile errors. After talking to Dan Kulp we found that this is due to the apt annotation processing for auto value types. Dan explained me how I need to setup eclipse to make it work. I still got 5 compile errors (Some bound mismatch at Read.bounded, and one ambiguous method empty). These errors seem to be present for everyone using eclipse and Dan works on it. So I think this is not a permanent problem. To make it easier for new people I would like to write a documentation about the IDE setup. I can cover the eclipse part but I think intellij should also be described. I already started with it and placed it in /contribute/ide-setup. Does that make sense? I currently did not link to it from anywhere. I think it should be linked in the contribute/index and in the Contribute menu. Christian >>> >>> -- >>> Jean-Baptiste Onofré >>> jbono...@apache.org >>> http://blog.nanthrax.net >>> Talend - http://www.talend.com >>> > > -- > Daniel Kulp > dk...@apache.org - http://dankulp.com/blog > Talend Community Coder - http://coders.talend.com > -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder -
Re: Documentation for IDE setup
I gonna merge. Thanks. On 10/14/2016 05:37 PM, Daniel Kulp wrote: On Oct 14, 2016, at 10:06 AM, Jesse Andersonwrote: Last week I imported Beam with IntelliJ and everything worked. That said, I tried to import the Eclipse project and that doesn't compile anymore. I didn't have time to figure out what happened though. I have a pull request https://github.com/apache/incubator-beam/pull/1094 that fixes the compile issues. It has two LGTM’s, just needs someone to merge it. With eclipse, you need to have all the needed m2e connectors. Some of them (find bugs, check style) can be auto-detected and installed when beam is first imported. The apt one doesn’t. You need to go to the eclipse marketplace, install it, then configure it in the Eclipse properties to turn on the “experimental” m2e-apt processing. Once you do that, a refresh of the maven projects should result in it building/compiling. Running tests is another matter. Since eclipse compiles everything in a module in one pass (instead of two like maven), one of the apt processors doesn’t know where to output files and always dumps the files in /classes instead of /test-classes. Thus, any test that relies on a runner will likely fail as it results in the “test” versions of various services from core being picked up. A simple: rm sdks/java/core/target/classes/META-INF/services/* From the command line will fix that. That should also be documented on the IDE page until someone can figure out how to work around it. Dan On Fri, Oct 14, 2016 at 1:21 AM Jean-Baptiste Onofré wrote: Hi Christian, IntelliJ doesn't need any special config (maybe the code style can be documented or imported). Anyway, agree to add such on website in the contribute directory. I think it could be part of the contribution-guide as it's first setup step. Regards JB On 10/14/2016 10:17 AM, Christian Schneider wrote: Hello all, I am new to the beam community and currently start making myself familiar with the code. I quickly found the contribution guide and was able to clone the code and build beam using maven. The first obstacle I faced was getting the code build in eclipse. I naively imported as existing maven projects but got lots of compile errors. After talking to Dan Kulp we found that this is due to the apt annotation processing for auto value types. Dan explained me how I need to setup eclipse to make it work. I still got 5 compile errors (Some bound mismatch at Read.bounded, and one ambiguous method empty). These errors seem to be present for everyone using eclipse and Dan works on it. So I think this is not a permanent problem. To make it easier for new people I would like to write a documentation about the IDE setup. I can cover the eclipse part but I think intellij should also be described. I already started with it and placed it in /contribute/ide-setup. Does that make sense? I currently did not link to it from anywhere. I think it should be linked in the contribute/index and in the Contribute menu. Christian -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Documentation for IDE setup
> On Oct 14, 2016, at 10:06 AM, Jesse Andersonwrote: > > Last week I imported Beam with IntelliJ and everything worked. > > That said, I tried to import the Eclipse project and that doesn't compile > anymore. I didn't have time to figure out what happened though. > I have a pull request https://github.com/apache/incubator-beam/pull/1094 that fixes the compile issues. It has two LGTM’s, just needs someone to merge it. With eclipse, you need to have all the needed m2e connectors. Some of them (find bugs, check style) can be auto-detected and installed when beam is first imported. The apt one doesn’t. You need to go to the eclipse marketplace, install it, then configure it in the Eclipse properties to turn on the “experimental” m2e-apt processing. Once you do that, a refresh of the maven projects should result in it building/compiling. Running tests is another matter. Since eclipse compiles everything in a module in one pass (instead of two like maven), one of the apt processors doesn’t know where to output files and always dumps the files in /classes instead of /test-classes. Thus, any test that relies on a runner will likely fail as it results in the “test” versions of various services from core being picked up. A simple: rm sdks/java/core/target/classes/META-INF/services/* From the command line will fix that. That should also be documented on the IDE page until someone can figure out how to work around it. Dan > On Fri, Oct 14, 2016 at 1:21 AM Jean-Baptiste Onofré > wrote: > >> Hi Christian, >> >> IntelliJ doesn't need any special config (maybe the code style can be >> documented or imported). >> >> Anyway, agree to add such on website in the contribute directory. I >> think it could be part of the contribution-guide as it's first setup step. >> >> Regards >> JB >> >> On 10/14/2016 10:17 AM, Christian Schneider wrote: >>> Hello all, >>> >>> I am new to the beam community and currently start making myself >>> familiar with the code. I quickly found the contribution guide and was >>> able to clone the code and build beam using maven. >>> >>> The first obstacle I faced was getting the code build in eclipse. I >>> naively imported as existing maven projects but got lots of compile >>> errors. After talking to Dan Kulp we found that this is due to the apt >>> annotation processing for auto value types. Dan explained me how I need >>> to setup eclipse to make it work. >>> >>> I still got 5 compile errors (Some bound mismatch at Read.bounded, and >>> one ambiguous method empty). These errors seem to be present for >>> everyone using eclipse and Dan works on it. So I think this is not a >>> permanent problem. >>> >>> To make it easier for new people I would like to write a documentation >>> about the IDE setup. I can cover the eclipse part but I think intellij >>> should also be described. >>> >>> I already started with it and placed it in /contribute/ide-setup. Does >>> that make sense? >>> >>> I currently did not link to it from anywhere. I think it should be >>> linked in the contribute/index and in the Contribute menu. >>> >>> Christian >>> >> >> -- >> Jean-Baptiste Onofré >> jbono...@apache.org >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
Re: Documentation for IDE setup
Btw. I finished the documentation now and created a PR: https://github.com/apache/incubator-beam-site/pull/44 While testing the documentation I also found this issue: https://github.com/apache/incubator-beam-site/pull/45 Christian On 14.10.2016 10:17, Christian Schneider wrote: Hello all, I am new to the beam community and currently start making myself familiar with the code. I quickly found the contribution guide and was able to clone the code and build beam using maven. The first obstacle I faced was getting the code build in eclipse. I naively imported as existing maven projects but got lots of compile errors. After talking to Dan Kulp we found that this is due to the apt annotation processing for auto value types. Dan explained me how I need to setup eclipse to make it work. I still got 5 compile errors (Some bound mismatch at Read.bounded, and one ambiguous method empty). These errors seem to be present for everyone using eclipse and Dan works on it. So I think this is not a permanent problem. To make it easier for new people I would like to write a documentation about the IDE setup. I can cover the eclipse part but I think intellij should also be described. I already started with it and placed it in /contribute/ide-setup. Does that make sense? I currently did not link to it from anywhere. I think it should be linked in the contribute/index and in the Contribute menu. Christian -- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com
Re: Documentation for IDE setup
I rely on having the Maven Eclipse integration and m2e-apt and do a maven import of a project. On Fri, Oct 14, 2016 at 8:10 AM, Jesse Andersonwrote: > I did a "mvn eclipse:eclipse" to generate the Eclipse projects and imported > them. That didn't compile either. > > On Fri, Oct 14, 2016 at 8:06 AM Lukasz Cwik > wrote: > > > I use Eclipse for development but always defer to maven since its the > > source of truth in the end. > > I also have issues with getting it to compile on import and it has to do > > with annotation processing and generally requires m2e-apt to be installed > > and configured correctly. > > > > On Fri, Oct 14, 2016 at 7:25 AM, Neelesh Salian > > wrote: > > > > > I was looking for the same couple of days ago. > > > But IntelliJ is less worrisome than Eclipse. > > > > > > Straight Import. No Hassle. > > > +1 to docs, though. > > > > > > On Fri, Oct 14, 2016 at 7:19 AM, Jean-Baptiste Onofré > > > > wrote: > > > > > > > [Troll] Who's using Eclipse anymore ? [/Troll] > > > > > > > > ;) > > > > > > > > Regards > > > > JB > > > > > > > > > > > > On 10/14/2016 04:06 PM, Jesse Anderson wrote: > > > > > > > >> Last week I imported Beam with IntelliJ and everything worked. > > > >> > > > >> That said, I tried to import the Eclipse project and that doesn't > > > compile > > > >> anymore. I didn't have time to figure out what happened though. > > > >> > > > >> On Fri, Oct 14, 2016 at 1:21 AM Jean-Baptiste Onofré < > j...@nanthrax.net > > > > > > >> wrote: > > > >> > > > >> Hi Christian, > > > >>> > > > >>> IntelliJ doesn't need any special config (maybe the code style can > be > > > >>> documented or imported). > > > >>> > > > >>> Anyway, agree to add such on website in the contribute directory. I > > > >>> think it could be part of the contribution-guide as it's first > setup > > > >>> step. > > > >>> > > > >>> Regards > > > >>> JB > > > >>> > > > >>> On 10/14/2016 10:17 AM, Christian Schneider wrote: > > > >>> > > > Hello all, > > > > > > I am new to the beam community and currently start making myself > > > familiar with the code. I quickly found the contribution guide > and > > > was > > > able to clone the code and build beam using maven. > > > > > > The first obstacle I faced was getting the code build in eclipse. > I > > > naively imported as existing maven projects but got lots of > compile > > > errors. After talking to Dan Kulp we found that this is due to the > > apt > > > annotation processing for auto value types. Dan explained me how I > > > need > > > to setup eclipse to make it work. > > > > > > I still got 5 compile errors (Some bound mismatch at Read.bounded, > > and > > > one ambiguous method empty). These errors seem to be present for > > > everyone using eclipse and Dan works on it. So I think this is > not a > > > permanent problem. > > > > > > To make it easier for new people I would like to write a > > documentation > > > about the IDE setup. I can cover the eclipse part but I think > > intellij > > > should also be described. > > > > > > I already started with it and placed it in /contribute/ide-setup. > > Does > > > that make sense? > > > > > > I currently did not link to it from anywhere. I think it should be > > > linked in the contribute/index and in the Contribute menu. > > > > > > Christian > > > > > > > > > >>> -- > > > >>> Jean-Baptiste Onofré > > > >>> jbono...@apache.org > > > >>> http://blog.nanthrax.net > > > >>> Talend - http://www.talend.com > > > >>> > > > >>> > > > >> > > > > -- > > > > Jean-Baptiste Onofré > > > > jbono...@apache.org > > > > http://blog.nanthrax.net > > > > Talend - http://www.talend.com > > > > > > > > > > > > > > > > -- > > > Neelesh Srinivas Salian > > > Customer Operations Engineer > > > > > >
Re: Documentation for IDE setup
[Troll] Who's using Eclipse anymore ? [/Troll] ;) Regards JB On 10/14/2016 04:06 PM, Jesse Anderson wrote: Last week I imported Beam with IntelliJ and everything worked. That said, I tried to import the Eclipse project and that doesn't compile anymore. I didn't have time to figure out what happened though. On Fri, Oct 14, 2016 at 1:21 AM Jean-Baptiste Onofréwrote: Hi Christian, IntelliJ doesn't need any special config (maybe the code style can be documented or imported). Anyway, agree to add such on website in the contribute directory. I think it could be part of the contribution-guide as it's first setup step. Regards JB On 10/14/2016 10:17 AM, Christian Schneider wrote: Hello all, I am new to the beam community and currently start making myself familiar with the code. I quickly found the contribution guide and was able to clone the code and build beam using maven. The first obstacle I faced was getting the code build in eclipse. I naively imported as existing maven projects but got lots of compile errors. After talking to Dan Kulp we found that this is due to the apt annotation processing for auto value types. Dan explained me how I need to setup eclipse to make it work. I still got 5 compile errors (Some bound mismatch at Read.bounded, and one ambiguous method empty). These errors seem to be present for everyone using eclipse and Dan works on it. So I think this is not a permanent problem. To make it easier for new people I would like to write a documentation about the IDE setup. I can cover the eclipse part but I think intellij should also be described. I already started with it and placed it in /contribute/ide-setup. Does that make sense? I currently did not link to it from anywhere. I think it should be linked in the contribute/index and in the Contribute menu. Christian -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Documentation for IDE setup
Last week I imported Beam with IntelliJ and everything worked. That said, I tried to import the Eclipse project and that doesn't compile anymore. I didn't have time to figure out what happened though. On Fri, Oct 14, 2016 at 1:21 AM Jean-Baptiste Onofréwrote: > Hi Christian, > > IntelliJ doesn't need any special config (maybe the code style can be > documented or imported). > > Anyway, agree to add such on website in the contribute directory. I > think it could be part of the contribution-guide as it's first setup step. > > Regards > JB > > On 10/14/2016 10:17 AM, Christian Schneider wrote: > > Hello all, > > > > I am new to the beam community and currently start making myself > > familiar with the code. I quickly found the contribution guide and was > > able to clone the code and build beam using maven. > > > > The first obstacle I faced was getting the code build in eclipse. I > > naively imported as existing maven projects but got lots of compile > > errors. After talking to Dan Kulp we found that this is due to the apt > > annotation processing for auto value types. Dan explained me how I need > > to setup eclipse to make it work. > > > > I still got 5 compile errors (Some bound mismatch at Read.bounded, and > > one ambiguous method empty). These errors seem to be present for > > everyone using eclipse and Dan works on it. So I think this is not a > > permanent problem. > > > > To make it easier for new people I would like to write a documentation > > about the IDE setup. I can cover the eclipse part but I think intellij > > should also be described. > > > > I already started with it and placed it in /contribute/ide-setup. Does > > that make sense? > > > > I currently did not link to it from anywhere. I think it should be > > linked in the contribute/index and in the Contribute menu. > > > > Christian > > > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com >