You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Bruce Schuchardt <bs...@pivotal.io> on 2016/10/24 21:50:18 UTC

more spotless problems on Windows

Running geode-core:spotlessCheck complains that all of the .java files 
have format violations

* What went wrong:
Execution failed for task ':geode-core:spotlessJavaCheck'.
 > Format violations were found. Run 'gradlew spotlessApply' to fix them.
geode-core\src\jca\java\org\apache\geode\internal\ra\GFConnectionFactoryImpl.java
geode-core\src\jca\java\org\apache\geode\internal\ra\GFConnectionImpl.java
geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCALocalTransaction.java
geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCAManagedConnection.java
geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCAManagedConnectionFactory.java
geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCAManagedConnectionnMetaData.java
etc.

Until this is fixed I can't validate that the changes I check in conform 
to the formatting rules.

Re: more spotless problems on Windows

Posted by Nabarun Nag <nn...@pivotal.io>.
@Jared, sure I will verify the branch when I'm at my home windows
workstation. (Creating a AMI instance consumes a lot of time).

I will be let you know of the results asap.

Regards
Naba

On Fri, Nov 4, 2016 at 1:42 PM Jared Stewart <js...@pivotal.io> wrote:

> @Naba
>
> I pushed the proposed changes to a branch here:
> https://github.com/jaredjstewart/incubator-geode/tree/windowsLF <
> https://github.com/jaredjstewart/incubator-geode/tree/windowsLF>
>
> Can you see if you still have the same problem when you check out this
> branch?
>
> > On Nov 4, 2016, at 12:07 PM, Bruce Schuchardt <bs...@pivotal.io>
> wrote:
> >
> > Udo and I tried that & it didn't work.  Maybe you'll have better luck.
> >
> > Le 11/4/2016 à 11:59 AM, Jared Stewart a écrit :
> >> From the spotless devs:
> >>
> >> Git is not a pure content store, it mucks with line endings. Regardless
> of what you check-in, it will store your files with unix line endings in
> the repo.
> >>
> >> Then, when you checkout, it will modify the line endings to suit your
> platform. Unless you add a .gitattributes file to tell git "forget the
> platform, do what this file says".
> >>
> >> Remove lineEndings 'UNIX' in your build.gradle [Jared - we should put
> ‘GIT_ATTRIBUTES’ in its place], and add a .gitattributes file in your root
> directory with the content * text eol=lf and your problem will be fixed.
> >>
> >>
> >>
> >>> On Nov 4, 2016, at 10:48 AM, Nabarun Nag <nn...@pivotal.io> wrote:
> >>>
> >>> Thank you Jared. I wanted to confirm that this was not an isolated
> incident
> >>> specific to my machine.
> >>>
> >>> Regards
> >>> Naba
> >>>
> >>> On Fri, Nov 4, 2016 at 10:45 AM Jared Stewart <js...@pivotal.io>
> wrote:
> >>>
> >>>> @Naba,
> >>>>
> >>>> I filed a bug report with Spotless this morning.  The Spotless devs
> have
> >>>> been very responsive so far in my experience, hopefully this will be
> fixed
> >>>> soon.
> >>>>
> >>>>> On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
> >>>>>
> >>>>> @Udo, I confirmed that this is not limited to my windows 10
> environment.
> >>>> I
> >>>>> ran  the steps on a Windows Server 2016 AMI instance and the same
> error
> >>>>> occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
> >>>>>
> >>>>> I wanted to know if there is a mandate on what the value of
> >>>>> core.autocrlf should
> >>>>> be set to on a windows machine for geode dev work. For my experiments
> >>>> value
> >>>>> of core.autocrlf was set to true. [recommended for cross platform
> >>>>> development]
> >>>>>
> >>>>> Regards
> >>>>> Naba
> >>>>>
> >>>>>
> >>>>> On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
> >>>>>
> >>>>>> @Jared
> >>>>>> I ran ./gradlew spotlessApply on the Windows 10 machine using git
> bash
> >>>>>> this is what has happened.
> >>>>>> NOTE: I started the below steps on a fresh git clone of the open
> side.
> >>>>>> [Steps:
> >>>>>> 1.  git clone
> >>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> >>>>>> open
> >>>>>> 2. cd open
> >>>>>> 3. git checkout -b develop origin/develop]
> >>>>>>
> >>>>>> *Step 1. ./gradlew clean build -Dskip.tests=true*
> >>>>>>
> >>>>>> FAILURE: Build failed with an exception.
> >>>>>>
> >>>>>> * What went wrong:
> >>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
> >>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
> them.
> >>>>>>
> >>>>
> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
> >>>>>>
> >>>>
> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
> >>>>>>
> >>>>
> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
> >>>>>>
> >>>>
> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
> >>>>>>
> >>>>
> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
> >>>>>>
> >>>>>> *Step 2: ./gradlew spotlessApply*
> >>>>>>
> >>>>>> BUILD SUCCESSFUL
> >>>>>>
> >>>>>> Total time: 12.728 secs
> >>>>>>
> >>>>>>
> >>>>>> *Step 3: git status*
> >>>>>>
> >>>>>> modified:
> >>>>>>
> >>>>
> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
> >>>>>>       modified:
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
> >>>>>>       modified:
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
> >>>>>>       modified:
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
> >>>>>>       modified:
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
> >>>>>>
> >>>>>> *Step 4 : git add .*
> >>>>>> warning: LF will be replaced by CRLF in
> >>>>>>
> >>>>
> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
> >>>>>> The file will have its original line endings in your working
> directory.
> >>>>>> warning: LF will be replaced by CRLF in
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
> >>>>>> The file will have its original line endings in your working
> directory.
> >>>>>> warning: LF will be replaced by CRLF in
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
> >>>>>> The file will have its original line endings in your working
> directory.
> >>>>>> warning: LF will be replaced by CRLF in
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
> >>>>>> The file will have its original line endings in your working
> directory.
> >>>>>> warning: LF will be replaced by CRLF in
> >>>>>>
> >>>>
> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
> >>>>>> The file will have its original line endings in your working
> directory.
> >>>>>>
> >>>>>>
> >>>>>> *Step 5: git status*
> >>>>>> On branch develop
> >>>>>> Your branch is up-to-date with 'origin/develop'.
> >>>>>> nothing to commit, working tree clean
> >>>>>>
> >>>>>>
> >>>>>> *Step 6: ./gradlew clean build -Dskip.tests=true*
> >>>>>> BUILD SUCCESSFUL
> >>>>>>
> >>>>>> Total time: 5 mins 28.64 secs
> >>>>>>
> >>>>>> NOTE: This happens only the first time. I did run the above
> steps,couple
> >>>>>> of times on  fresh checkouts and I was able to reproduce it every
> time.
> >>>>>>
> >>>>>> However, after running spotlessApply and git add . the first time,
> the
> >>>>>> spotless errors do not reoccur on subsequent builds.
> >>>>>>
> >>>>>> I will try running this on other machines and check if this occurs
> in
> >>>>>> other windows environments.
> >>>>>>
> >>>>>>
> >>>>>> Regards
> >>>>>> Naba
> >>>>>>
> >>>>>> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <ukohlmeyer@pivotal.io
> >
> >>>>>> wrote:
> >>>>>>
> >>>>>> @Jared, I mailed with the Spotless project devs and they recommend
> using
> >>>>>> .gitattributes. But maybe @Naba's problem is Windows10 related...
> Who
> >>>>>> knows..
> >>>>>>
> >>>>>> --Udo
> >>>>>>
> >>>>>>
> >>>>>> On 4/11/16 10:16 am, Jared Stewart wrote:
> >>>>>>> The only Windows machine I have is running Windows 8, and I am
> unable
> >>>> to
> >>>>>> reproduce this on that machine.  I don’t think .gitattributes would
> >>>> affect
> >>>>>> this, since we have already configured spotless to always use Unix
> line
> >>>>>> endings.
> >>>>>>> Naba - Can you run ‘./gradlew spotlessApply’ and push the results
> to a
> >>>>>> branch so I can see what Spotless was complaining about?
> >>>>>>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
> >>>>>>>>
> >>>>>>>> I think we seriously have to look at using .gitattributes for
> this...
> >>>>>>>>
> >>>>>>>> As I initially said, it should be a no brainer.. it should just
> >>>>>> automatically just work.
> >>>>>>>> --Udo
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
> >>>>>>>>> It's been working on my Windows 7 machine under a cygwin shell.
>  I
> >>>>>> just ran it again using "clean bulid -Dskip.tests=true" from the
> root
> >>>> Geode
> >>>>>> directory on the develop branch.
> >>>>>>>>> Run spotlessApply and let us know how it modified the files.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
> >>>>>>>>>> I tested gradlew build on a windows 10 machine to test the
> spotless
> >>>>>> feature.
> >>>>>>>>>> Steps:
> >>>>>>>>>> 1.  git clone
> >>>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> >>>>>>>>>> open
> >>>>>>>>>> 2. cd open
> >>>>>>>>>> 3. git checkout -b develop origin/develop
> >>>>>>>>>> 4.  ./gradlew clean build -Dskip.tests=true
> >>>>>>>>>>
> >>>>>>>>>> The build failed with multiple formatting error on each file.
> >>>>>>>>>>
> >>>>>>>>>> In my opinion the issue still exists. It will be awesome if
> someone
> >>>>>> else
> >>>>>>>>>> can verify if the issue still exists by running the build steps
> on a
> >>>>>>>>>> different windows machine.
> >>>>>>>>>>
> >>>>>>>>>> Regards
> >>>>>>>>>> Nabarun
> >>>>>>>>>>
> >>>>>>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
> >>>>>> bschuchardt@pivotal.io>
> >>>>>>>>>> wrote:
> >>>>>>>>>>
> >>>>>>>>>>> The lineEndings setting works great. I've pushed the change to
> >>>>>> develop
> >>>>>>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
> >>>>>> wrote:
> >>>>>>>>>>>> I think we have a fix for the spotless line ending issue on
> >>>> windows;
> >>>>>>>>>>> Bruce
> >>>>>>>>>>>> will check it in shortly:
> >>>>>>>>>>>>
> >>>>>>>>>>>> diff --git a/build.gradle b/build.gradle
> >>>>>>>>>>>> index a734e05..6e82433 100755
> >>>>>>>>>>>> --- a/build.gradle
> >>>>>>>>>>>> +++ b/build.gradle
> >>>>>>>>>>>> @@ -88,6 +88,7 @@ subprojects {
> >>>>>>>>>>>>
> >>>>>>>>>>>>   apply plugin: "com.diffplug.gradle.spotless"
> >>>>>>>>>>>>   spotless {
> >>>>>>>>>>>> +    lineEndings = 'unix';
> >>>>>>>>>>>>     java {
> >>>>>>>>>>>>       eclipseFormatFile
> >>>>>>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
> >>>>>>>>>>> bschuchardt@pivotal.io>
> >>>>>>>>>>>> wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>>> Running geode-core:spotlessCheck complains that all of the
> .java
> >>>>>> files
> >>>>>>>>>>>>> have format violations
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> * What went wrong:
> >>>>>>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
> >>>>>>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply'
> to fix
> >>>>>>>>>>> them.
> >>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
> >>>>>>>>>>>>> ctionFactoryImpl.java
> >>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
> >>>>>>>>>>>> GFConnectionImpl.java
> >>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>>>>>> LocalTransaction.java
> >>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>>>>>> ManagedConnection.java
> >>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>>>>>> ManagedConnectionFactory.java
> >>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>>>>>> ManagedConnectionnMetaData.java
> >>>>>>>>>>>>> etc.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Until this is fixed I can't validate that the changes I
> check in
> >>>>>>>>>>> conform
> >>>>>>>>>>>>> to the formatting rules.
> >>>>>>>>>>>>>
> >>>>>>
> >>>>
> >>
> >
>
>

Re: more spotless problems on Windows

Posted by Jared Stewart <js...@pivotal.io>.
@Naba

I pushed the proposed changes to a branch here: https://github.com/jaredjstewart/incubator-geode/tree/windowsLF <https://github.com/jaredjstewart/incubator-geode/tree/windowsLF>

Can you see if you still have the same problem when you check out this branch?

> On Nov 4, 2016, at 12:07 PM, Bruce Schuchardt <bs...@pivotal.io> wrote:
> 
> Udo and I tried that & it didn't work.  Maybe you'll have better luck.
> 
> Le 11/4/2016 à 11:59 AM, Jared Stewart a écrit :
>> From the spotless devs:
>> 
>> Git is not a pure content store, it mucks with line endings. Regardless of what you check-in, it will store your files with unix line endings in the repo.
>> 
>> Then, when you checkout, it will modify the line endings to suit your platform. Unless you add a .gitattributes file to tell git "forget the platform, do what this file says".
>> 
>> Remove lineEndings 'UNIX' in your build.gradle [Jared - we should put ‘GIT_ATTRIBUTES’ in its place], and add a .gitattributes file in your root directory with the content * text eol=lf and your problem will be fixed.
>> 
>> 
>> 
>>> On Nov 4, 2016, at 10:48 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>> 
>>> Thank you Jared. I wanted to confirm that this was not an isolated incident
>>> specific to my machine.
>>> 
>>> Regards
>>> Naba
>>> 
>>> On Fri, Nov 4, 2016 at 10:45 AM Jared Stewart <js...@pivotal.io> wrote:
>>> 
>>>> @Naba,
>>>> 
>>>> I filed a bug report with Spotless this morning.  The Spotless devs have
>>>> been very responsive so far in my experience, hopefully this will be fixed
>>>> soon.
>>>> 
>>>>> On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>>>> 
>>>>> @Udo, I confirmed that this is not limited to my windows 10 environment.
>>>> I
>>>>> ran  the steps on a Windows Server 2016 AMI instance and the same error
>>>>> occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
>>>>> 
>>>>> I wanted to know if there is a mandate on what the value of
>>>>> core.autocrlf should
>>>>> be set to on a windows machine for geode dev work. For my experiments
>>>> value
>>>>> of core.autocrlf was set to true. [recommended for cross platform
>>>>> development]
>>>>> 
>>>>> Regards
>>>>> Naba
>>>>> 
>>>>> 
>>>>> On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
>>>>> 
>>>>>> @Jared
>>>>>> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
>>>>>> this is what has happened.
>>>>>> NOTE: I started the below steps on a fresh git clone of the open side.
>>>>>> [Steps:
>>>>>> 1.  git clone
>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>> open
>>>>>> 2. cd open
>>>>>> 3. git checkout -b develop origin/develop]
>>>>>> 
>>>>>> *Step 1. ./gradlew clean build -Dskip.tests=true*
>>>>>> 
>>>>>> FAILURE: Build failed with an exception.
>>>>>> 
>>>>>> * What went wrong:
>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix them.
>>>>>> 
>>>> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>> 
>>>>>> *Step 2: ./gradlew spotlessApply*
>>>>>> 
>>>>>> BUILD SUCCESSFUL
>>>>>> 
>>>>>> Total time: 12.728 secs
>>>>>> 
>>>>>> 
>>>>>> *Step 3: git status*
>>>>>> 
>>>>>> modified:
>>>>>> 
>>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>> 
>>>>>> *Step 4 : git add .*
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> 
>>>>>> 
>>>>>> *Step 5: git status*
>>>>>> On branch develop
>>>>>> Your branch is up-to-date with 'origin/develop'.
>>>>>> nothing to commit, working tree clean
>>>>>> 
>>>>>> 
>>>>>> *Step 6: ./gradlew clean build -Dskip.tests=true*
>>>>>> BUILD SUCCESSFUL
>>>>>> 
>>>>>> Total time: 5 mins 28.64 secs
>>>>>> 
>>>>>> NOTE: This happens only the first time. I did run the above steps,couple
>>>>>> of times on  fresh checkouts and I was able to reproduce it every time.
>>>>>> 
>>>>>> However, after running spotlessApply and git add . the first time, the
>>>>>> spotless errors do not reoccur on subsequent builds.
>>>>>> 
>>>>>> I will try running this on other machines and check if this occurs in
>>>>>> other windows environments.
>>>>>> 
>>>>>> 
>>>>>> Regards
>>>>>> Naba
>>>>>> 
>>>>>> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
>>>>>> wrote:
>>>>>> 
>>>>>> @Jared, I mailed with the Spotless project devs and they recommend using
>>>>>> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
>>>>>> knows..
>>>>>> 
>>>>>> --Udo
>>>>>> 
>>>>>> 
>>>>>> On 4/11/16 10:16 am, Jared Stewart wrote:
>>>>>>> The only Windows machine I have is running Windows 8, and I am unable
>>>> to
>>>>>> reproduce this on that machine.  I don’t think .gitattributes would
>>>> affect
>>>>>> this, since we have already configured spotless to always use Unix line
>>>>>> endings.
>>>>>>> Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a
>>>>>> branch so I can see what Spotless was complaining about?
>>>>>>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
>>>>>>>> 
>>>>>>>> I think we seriously have to look at using .gitattributes for this...
>>>>>>>> 
>>>>>>>> As I initially said, it should be a no brainer.. it should just
>>>>>> automatically just work.
>>>>>>>> --Udo
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>>>>>>>>> It's been working on my Windows 7 machine under a cygwin shell.   I
>>>>>> just ran it again using "clean bulid -Dskip.tests=true" from the root
>>>> Geode
>>>>>> directory on the develop branch.
>>>>>>>>> Run spotlessApply and let us know how it modified the files.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
>>>>>>>>>> I tested gradlew build on a windows 10 machine to test the spotless
>>>>>> feature.
>>>>>>>>>> Steps:
>>>>>>>>>> 1.  git clone
>>>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>>>>>> open
>>>>>>>>>> 2. cd open
>>>>>>>>>> 3. git checkout -b develop origin/develop
>>>>>>>>>> 4.  ./gradlew clean build -Dskip.tests=true
>>>>>>>>>> 
>>>>>>>>>> The build failed with multiple formatting error on each file.
>>>>>>>>>> 
>>>>>>>>>> In my opinion the issue still exists. It will be awesome if someone
>>>>>> else
>>>>>>>>>> can verify if the issue still exists by running the build steps on a
>>>>>>>>>> different windows machine.
>>>>>>>>>> 
>>>>>>>>>> Regards
>>>>>>>>>> Nabarun
>>>>>>>>>> 
>>>>>>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> The lineEndings setting works great. I've pushed the change to
>>>>>> develop
>>>>>>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
>>>>>> wrote:
>>>>>>>>>>>> I think we have a fix for the spotless line ending issue on
>>>> windows;
>>>>>>>>>>> Bruce
>>>>>>>>>>>> will check it in shortly:
>>>>>>>>>>>> 
>>>>>>>>>>>> diff --git a/build.gradle b/build.gradle
>>>>>>>>>>>> index a734e05..6e82433 100755
>>>>>>>>>>>> --- a/build.gradle
>>>>>>>>>>>> +++ b/build.gradle
>>>>>>>>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>>>>>>>>> 
>>>>>>>>>>>>   apply plugin: "com.diffplug.gradle.spotless"
>>>>>>>>>>>>   spotless {
>>>>>>>>>>>> +    lineEndings = 'unix';
>>>>>>>>>>>>     java {
>>>>>>>>>>>>       eclipseFormatFile
>>>>>>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>>>>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Running geode-core:spotlessCheck complains that all of the .java
>>>>>> files
>>>>>>>>>>>>> have format violations
>>>>>>>>>>>>> 
>>>>>>>>>>>>> * What went wrong:
>>>>>>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>>>>>>>>> them.
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>>>>>>>>> ctionFactoryImpl.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>>>>>>>>> GFConnectionImpl.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> LocalTransaction.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> ManagedConnection.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> ManagedConnectionFactory.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> ManagedConnectionnMetaData.java
>>>>>>>>>>>>> etc.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Until this is fixed I can't validate that the changes I check in
>>>>>>>>>>> conform
>>>>>>>>>>>>> to the formatting rules.
>>>>>>>>>>>>> 
>>>>>> 
>>>> 
>> 
> 


Re: more spotless problems on Windows

Posted by Bruce Schuchardt <bs...@pivotal.io>.
I don't believe we did #2

Le 11/4/2016 � 12:09 PM, Jared Stewart a �crit :
> @Bruce
>
> To be clear, are you saying you did both of the following?
>
> 1). Create a .gitattributes file with \u201c *test eol=lf\u201d at the top level of Geode
> 2). Change \u2018UNIX\u2019 in build.gradle to \u2018GIT_ATTRIBUTES'
>
>> On Nov 4, 2016, at 12:07 PM, Bruce Schuchardt <bs...@pivotal.io> wrote:
>>
>> Udo and I tried that & it didn't work.  Maybe you'll have better luck.
>>
>> Le 11/4/2016 � 11:59 AM, Jared Stewart a �crit :
>>>  From the spotless devs:
>>>
>>> Git is not a pure content store, it mucks with line endings. Regardless of what you check-in, it will store your files with unix line endings in the repo.
>>>
>>> Then, when you checkout, it will modify the line endings to suit your platform. Unless you add a .gitattributes file to tell git "forget the platform, do what this file says".
>>>
>>> Remove lineEndings 'UNIX' in your build.gradle [Jared - we should put \u2018GIT_ATTRIBUTES\u2019 in its place], and add a .gitattributes file in your root directory with the content * text eol=lf and your problem will be fixed.
>>>
>>>
>>>
>>>> On Nov 4, 2016, at 10:48 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>>>
>>>> Thank you Jared. I wanted to confirm that this was not an isolated incident
>>>> specific to my machine.
>>>>
>>>> Regards
>>>> Naba
>>>>
>>>> On Fri, Nov 4, 2016 at 10:45 AM Jared Stewart <js...@pivotal.io> wrote:
>>>>
>>>>> @Naba,
>>>>>
>>>>> I filed a bug report with Spotless this morning.  The Spotless devs have
>>>>> been very responsive so far in my experience, hopefully this will be fixed
>>>>> soon.
>>>>>
>>>>>> On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>>>>>
>>>>>> @Udo, I confirmed that this is not limited to my windows 10 environment.
>>>>> I
>>>>>> ran  the steps on a Windows Server 2016 AMI instance and the same error
>>>>>> occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
>>>>>>
>>>>>> I wanted to know if there is a mandate on what the value of
>>>>>> core.autocrlf should
>>>>>> be set to on a windows machine for geode dev work. For my experiments
>>>>> value
>>>>>> of core.autocrlf was set to true. [recommended for cross platform
>>>>>> development]
>>>>>>
>>>>>> Regards
>>>>>> Naba
>>>>>>
>>>>>>
>>>>>> On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
>>>>>>
>>>>>>> @Jared
>>>>>>> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
>>>>>>> this is what has happened.
>>>>>>> NOTE: I started the below steps on a fresh git clone of the open side.
>>>>>>> [Steps:
>>>>>>> 1.  git clone
>>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>>> open
>>>>>>> 2. cd open
>>>>>>> 3. git checkout -b develop origin/develop]
>>>>>>>
>>>>>>> *Step 1. ./gradlew clean build -Dskip.tests=true*
>>>>>>>
>>>>>>> FAILURE: Build failed with an exception.
>>>>>>>
>>>>>>> * What went wrong:
>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix them.
>>>>> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
>>>>> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
>>>>> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
>>>>> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
>>>>> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>>> *Step 2: ./gradlew spotlessApply*
>>>>>>>
>>>>>>> BUILD SUCCESSFUL
>>>>>>>
>>>>>>> Total time: 12.728 secs
>>>>>>>
>>>>>>>
>>>>>>> *Step 3: git status*
>>>>>>>
>>>>>>> modified:
>>>>>>>
>>>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
>>>>>>>        modified:
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
>>>>>>>        modified:
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
>>>>>>>        modified:
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
>>>>>>>        modified:
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>>> *Step 4 : git add .*
>>>>>>> warning: LF will be replaced by CRLF in
>>>>>>>
>>>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
>>>>>>> The file will have its original line endings in your working directory.
>>>>>>> warning: LF will be replaced by CRLF in
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
>>>>>>> The file will have its original line endings in your working directory.
>>>>>>> warning: LF will be replaced by CRLF in
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
>>>>>>> The file will have its original line endings in your working directory.
>>>>>>> warning: LF will be replaced by CRLF in
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
>>>>>>> The file will have its original line endings in your working directory.
>>>>>>> warning: LF will be replaced by CRLF in
>>>>>>>
>>>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
>>>>>>> The file will have its original line endings in your working directory.
>>>>>>>
>>>>>>>
>>>>>>> *Step 5: git status*
>>>>>>> On branch develop
>>>>>>> Your branch is up-to-date with 'origin/develop'.
>>>>>>> nothing to commit, working tree clean
>>>>>>>
>>>>>>>
>>>>>>> *Step 6: ./gradlew clean build -Dskip.tests=true*
>>>>>>> BUILD SUCCESSFUL
>>>>>>>
>>>>>>> Total time: 5 mins 28.64 secs
>>>>>>>
>>>>>>> NOTE: This happens only the first time. I did run the above steps,couple
>>>>>>> of times on  fresh checkouts and I was able to reproduce it every time.
>>>>>>>
>>>>>>> However, after running spotlessApply and git add . the first time, the
>>>>>>> spotless errors do not reoccur on subsequent builds.
>>>>>>>
>>>>>>> I will try running this on other machines and check if this occurs in
>>>>>>> other windows environments.
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> Naba
>>>>>>>
>>>>>>> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
>>>>>>> wrote:
>>>>>>>
>>>>>>> @Jared, I mailed with the Spotless project devs and they recommend using
>>>>>>> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
>>>>>>> knows..
>>>>>>>
>>>>>>> --Udo
>>>>>>>
>>>>>>>
>>>>>>> On 4/11/16 10:16 am, Jared Stewart wrote:
>>>>>>>> The only Windows machine I have is running Windows 8, and I am unable
>>>>> to
>>>>>>> reproduce this on that machine.  I don\u2019t think .gitattributes would
>>>>> affect
>>>>>>> this, since we have already configured spotless to always use Unix line
>>>>>>> endings.
>>>>>>>> Naba - Can you run \u2018./gradlew spotlessApply\u2019 and push the results to a
>>>>>>> branch so I can see what Spotless was complaining about?
>>>>>>>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
>>>>>>>>>
>>>>>>>>> I think we seriously have to look at using .gitattributes for this...
>>>>>>>>>
>>>>>>>>> As I initially said, it should be a no brainer.. it should just
>>>>>>> automatically just work.
>>>>>>>>> --Udo
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>>>>>>>>>> It's been working on my Windows 7 machine under a cygwin shell.   I
>>>>>>> just ran it again using "clean bulid -Dskip.tests=true" from the root
>>>>> Geode
>>>>>>> directory on the develop branch.
>>>>>>>>>> Run spotlessApply and let us know how it modified the files.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Le 11/3/2016 � 12:38 PM, Nabarun Nag a �crit :
>>>>>>>>>>> I tested gradlew build on a windows 10 machine to test the spotless
>>>>>>> feature.
>>>>>>>>>>> Steps:
>>>>>>>>>>> 1.  git clone
>>>>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>>>>>>> open
>>>>>>>>>>> 2. cd open
>>>>>>>>>>> 3. git checkout -b develop origin/develop
>>>>>>>>>>> 4.  ./gradlew clean build -Dskip.tests=true
>>>>>>>>>>>
>>>>>>>>>>> The build failed with multiple formatting error on each file.
>>>>>>>>>>>
>>>>>>>>>>> In my opinion the issue still exists. It will be awesome if someone
>>>>>>> else
>>>>>>>>>>> can verify if the issue still exists by running the build steps on a
>>>>>>>>>>> different windows machine.
>>>>>>>>>>>
>>>>>>>>>>> Regards
>>>>>>>>>>> Nabarun
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
>>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> The lineEndings setting works great. I've pushed the change to
>>>>>>> develop
>>>>>>>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
>>>>>>> wrote:
>>>>>>>>>>>>> I think we have a fix for the spotless line ending issue on
>>>>> windows;
>>>>>>>>>>>> Bruce
>>>>>>>>>>>>> will check it in shortly:
>>>>>>>>>>>>>
>>>>>>>>>>>>> diff --git a/build.gradle b/build.gradle
>>>>>>>>>>>>> index a734e05..6e82433 100755
>>>>>>>>>>>>> --- a/build.gradle
>>>>>>>>>>>>> +++ b/build.gradle
>>>>>>>>>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>>>>>>>>>>
>>>>>>>>>>>>>    apply plugin: "com.diffplug.gradle.spotless"
>>>>>>>>>>>>>    spotless {
>>>>>>>>>>>>> +    lineEndings = 'unix';
>>>>>>>>>>>>>      java {
>>>>>>>>>>>>>        eclipseFormatFile
>>>>>>>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>>>>>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Running geode-core:spotlessCheck complains that all of the .java
>>>>>>> files
>>>>>>>>>>>>>> have format violations
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> * What went wrong:
>>>>>>>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>>>>>>>>>> them.
>>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>>>>>>>>>> ctionFactoryImpl.java
>>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>>>>>>>>>> GFConnectionImpl.java
>>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>>> LocalTransaction.java
>>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>>> ManagedConnection.java
>>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>>> ManagedConnectionFactory.java
>>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>>> ManagedConnectionnMetaData.java
>>>>>>>>>>>>>> etc.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Until this is fixed I can't validate that the changes I check in
>>>>>>>>>>>> conform
>>>>>>>>>>>>>> to the formatting rules.
>>>>>>>>>>>>>>


Re: more spotless problems on Windows

Posted by Jared Stewart <js...@pivotal.io>.
Correction:
“ * text eol=lf”
> On Nov 4, 2016, at 12:09 PM, Jared Stewart <js...@pivotal.io> wrote:
> 
> “ *test eol=lf”


Re: more spotless problems on Windows

Posted by Jared Stewart <js...@pivotal.io>.
@Bruce

To be clear, are you saying you did both of the following?

1). Create a .gitattributes file with “ *test eol=lf” at the top level of Geode
2). Change ‘UNIX’ in build.gradle to ‘GIT_ATTRIBUTES'

> On Nov 4, 2016, at 12:07 PM, Bruce Schuchardt <bs...@pivotal.io> wrote:
> 
> Udo and I tried that & it didn't work.  Maybe you'll have better luck.
> 
> Le 11/4/2016 à 11:59 AM, Jared Stewart a écrit :
>> From the spotless devs:
>> 
>> Git is not a pure content store, it mucks with line endings. Regardless of what you check-in, it will store your files with unix line endings in the repo.
>> 
>> Then, when you checkout, it will modify the line endings to suit your platform. Unless you add a .gitattributes file to tell git "forget the platform, do what this file says".
>> 
>> Remove lineEndings 'UNIX' in your build.gradle [Jared - we should put ‘GIT_ATTRIBUTES’ in its place], and add a .gitattributes file in your root directory with the content * text eol=lf and your problem will be fixed.
>> 
>> 
>> 
>>> On Nov 4, 2016, at 10:48 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>> 
>>> Thank you Jared. I wanted to confirm that this was not an isolated incident
>>> specific to my machine.
>>> 
>>> Regards
>>> Naba
>>> 
>>> On Fri, Nov 4, 2016 at 10:45 AM Jared Stewart <js...@pivotal.io> wrote:
>>> 
>>>> @Naba,
>>>> 
>>>> I filed a bug report with Spotless this morning.  The Spotless devs have
>>>> been very responsive so far in my experience, hopefully this will be fixed
>>>> soon.
>>>> 
>>>>> On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>>>> 
>>>>> @Udo, I confirmed that this is not limited to my windows 10 environment.
>>>> I
>>>>> ran  the steps on a Windows Server 2016 AMI instance and the same error
>>>>> occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
>>>>> 
>>>>> I wanted to know if there is a mandate on what the value of
>>>>> core.autocrlf should
>>>>> be set to on a windows machine for geode dev work. For my experiments
>>>> value
>>>>> of core.autocrlf was set to true. [recommended for cross platform
>>>>> development]
>>>>> 
>>>>> Regards
>>>>> Naba
>>>>> 
>>>>> 
>>>>> On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
>>>>> 
>>>>>> @Jared
>>>>>> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
>>>>>> this is what has happened.
>>>>>> NOTE: I started the below steps on a fresh git clone of the open side.
>>>>>> [Steps:
>>>>>> 1.  git clone
>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>> open
>>>>>> 2. cd open
>>>>>> 3. git checkout -b develop origin/develop]
>>>>>> 
>>>>>> *Step 1. ./gradlew clean build -Dskip.tests=true*
>>>>>> 
>>>>>> FAILURE: Build failed with an exception.
>>>>>> 
>>>>>> * What went wrong:
>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix them.
>>>>>> 
>>>> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
>>>>>> 
>>>> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>> 
>>>>>> *Step 2: ./gradlew spotlessApply*
>>>>>> 
>>>>>> BUILD SUCCESSFUL
>>>>>> 
>>>>>> Total time: 12.728 secs
>>>>>> 
>>>>>> 
>>>>>> *Step 3: git status*
>>>>>> 
>>>>>> modified:
>>>>>> 
>>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
>>>>>>       modified:
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>> 
>>>>>> *Step 4 : git add .*
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> warning: LF will be replaced by CRLF in
>>>>>> 
>>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
>>>>>> The file will have its original line endings in your working directory.
>>>>>> 
>>>>>> 
>>>>>> *Step 5: git status*
>>>>>> On branch develop
>>>>>> Your branch is up-to-date with 'origin/develop'.
>>>>>> nothing to commit, working tree clean
>>>>>> 
>>>>>> 
>>>>>> *Step 6: ./gradlew clean build -Dskip.tests=true*
>>>>>> BUILD SUCCESSFUL
>>>>>> 
>>>>>> Total time: 5 mins 28.64 secs
>>>>>> 
>>>>>> NOTE: This happens only the first time. I did run the above steps,couple
>>>>>> of times on  fresh checkouts and I was able to reproduce it every time.
>>>>>> 
>>>>>> However, after running spotlessApply and git add . the first time, the
>>>>>> spotless errors do not reoccur on subsequent builds.
>>>>>> 
>>>>>> I will try running this on other machines and check if this occurs in
>>>>>> other windows environments.
>>>>>> 
>>>>>> 
>>>>>> Regards
>>>>>> Naba
>>>>>> 
>>>>>> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
>>>>>> wrote:
>>>>>> 
>>>>>> @Jared, I mailed with the Spotless project devs and they recommend using
>>>>>> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
>>>>>> knows..
>>>>>> 
>>>>>> --Udo
>>>>>> 
>>>>>> 
>>>>>> On 4/11/16 10:16 am, Jared Stewart wrote:
>>>>>>> The only Windows machine I have is running Windows 8, and I am unable
>>>> to
>>>>>> reproduce this on that machine.  I don’t think .gitattributes would
>>>> affect
>>>>>> this, since we have already configured spotless to always use Unix line
>>>>>> endings.
>>>>>>> Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a
>>>>>> branch so I can see what Spotless was complaining about?
>>>>>>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
>>>>>>>> 
>>>>>>>> I think we seriously have to look at using .gitattributes for this...
>>>>>>>> 
>>>>>>>> As I initially said, it should be a no brainer.. it should just
>>>>>> automatically just work.
>>>>>>>> --Udo
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>>>>>>>>> It's been working on my Windows 7 machine under a cygwin shell.   I
>>>>>> just ran it again using "clean bulid -Dskip.tests=true" from the root
>>>> Geode
>>>>>> directory on the develop branch.
>>>>>>>>> Run spotlessApply and let us know how it modified the files.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
>>>>>>>>>> I tested gradlew build on a windows 10 machine to test the spotless
>>>>>> feature.
>>>>>>>>>> Steps:
>>>>>>>>>> 1.  git clone
>>>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>>>>>> open
>>>>>>>>>> 2. cd open
>>>>>>>>>> 3. git checkout -b develop origin/develop
>>>>>>>>>> 4.  ./gradlew clean build -Dskip.tests=true
>>>>>>>>>> 
>>>>>>>>>> The build failed with multiple formatting error on each file.
>>>>>>>>>> 
>>>>>>>>>> In my opinion the issue still exists. It will be awesome if someone
>>>>>> else
>>>>>>>>>> can verify if the issue still exists by running the build steps on a
>>>>>>>>>> different windows machine.
>>>>>>>>>> 
>>>>>>>>>> Regards
>>>>>>>>>> Nabarun
>>>>>>>>>> 
>>>>>>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> The lineEndings setting works great. I've pushed the change to
>>>>>> develop
>>>>>>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
>>>>>> wrote:
>>>>>>>>>>>> I think we have a fix for the spotless line ending issue on
>>>> windows;
>>>>>>>>>>> Bruce
>>>>>>>>>>>> will check it in shortly:
>>>>>>>>>>>> 
>>>>>>>>>>>> diff --git a/build.gradle b/build.gradle
>>>>>>>>>>>> index a734e05..6e82433 100755
>>>>>>>>>>>> --- a/build.gradle
>>>>>>>>>>>> +++ b/build.gradle
>>>>>>>>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>>>>>>>>> 
>>>>>>>>>>>>   apply plugin: "com.diffplug.gradle.spotless"
>>>>>>>>>>>>   spotless {
>>>>>>>>>>>> +    lineEndings = 'unix';
>>>>>>>>>>>>     java {
>>>>>>>>>>>>       eclipseFormatFile
>>>>>>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>>>>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Running geode-core:spotlessCheck complains that all of the .java
>>>>>> files
>>>>>>>>>>>>> have format violations
>>>>>>>>>>>>> 
>>>>>>>>>>>>> * What went wrong:
>>>>>>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>>>>>>>>> them.
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>>>>>>>>> ctionFactoryImpl.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>>>>>>>>> GFConnectionImpl.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> LocalTransaction.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> ManagedConnection.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> ManagedConnectionFactory.java
>>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>>> ManagedConnectionnMetaData.java
>>>>>>>>>>>>> etc.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Until this is fixed I can't validate that the changes I check in
>>>>>>>>>>> conform
>>>>>>>>>>>>> to the formatting rules.
>>>>>>>>>>>>> 
>>>>>> 
>>>> 
>> 
> 


Re: more spotless problems on Windows

Posted by Bruce Schuchardt <bs...@pivotal.io>.
Udo and I tried that & it didn't work.  Maybe you'll have better luck.

Le 11/4/2016 � 11:59 AM, Jared Stewart a �crit :
>  From the spotless devs:
>
> Git is not a pure content store, it mucks with line endings. Regardless of what you check-in, it will store your files with unix line endings in the repo.
>
> Then, when you checkout, it will modify the line endings to suit your platform. Unless you add a .gitattributes file to tell git "forget the platform, do what this file says".
>
> Remove lineEndings 'UNIX' in your build.gradle [Jared - we should put \u2018GIT_ATTRIBUTES\u2019 in its place], and add a .gitattributes file in your root directory with the content * text eol=lf and your problem will be fixed.
>
>
>
>> On Nov 4, 2016, at 10:48 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>
>> Thank you Jared. I wanted to confirm that this was not an isolated incident
>> specific to my machine.
>>
>> Regards
>> Naba
>>
>> On Fri, Nov 4, 2016 at 10:45 AM Jared Stewart <js...@pivotal.io> wrote:
>>
>>> @Naba,
>>>
>>> I filed a bug report with Spotless this morning.  The Spotless devs have
>>> been very responsive so far in my experience, hopefully this will be fixed
>>> soon.
>>>
>>>> On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>>>
>>>> @Udo, I confirmed that this is not limited to my windows 10 environment.
>>> I
>>>> ran  the steps on a Windows Server 2016 AMI instance and the same error
>>>> occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
>>>>
>>>> I wanted to know if there is a mandate on what the value of
>>>> core.autocrlf should
>>>> be set to on a windows machine for geode dev work. For my experiments
>>> value
>>>> of core.autocrlf was set to true. [recommended for cross platform
>>>> development]
>>>>
>>>> Regards
>>>> Naba
>>>>
>>>>
>>>> On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
>>>>
>>>>> @Jared
>>>>> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
>>>>> this is what has happened.
>>>>> NOTE: I started the below steps on a fresh git clone of the open side.
>>>>> [Steps:
>>>>> 1.  git clone
>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>> open
>>>>> 2. cd open
>>>>> 3. git checkout -b develop origin/develop]
>>>>>
>>>>> *Step 1. ./gradlew clean build -Dskip.tests=true*
>>>>>
>>>>> FAILURE: Build failed with an exception.
>>>>>
>>>>> * What went wrong:
>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix them.
>>>>>
>>> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
>>>>>
>>> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
>>>>>
>>> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
>>>>>
>>> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
>>>>>
>>> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>
>>>>> *Step 2: ./gradlew spotlessApply*
>>>>>
>>>>> BUILD SUCCESSFUL
>>>>>
>>>>> Total time: 12.728 secs
>>>>>
>>>>>
>>>>> *Step 3: git status*
>>>>>
>>>>> modified:
>>>>>
>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
>>>>>        modified:
>>>>>
>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
>>>>>        modified:
>>>>>
>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
>>>>>        modified:
>>>>>
>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
>>>>>        modified:
>>>>>
>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
>>>>>
>>>>> *Step 4 : git add .*
>>>>> warning: LF will be replaced by CRLF in
>>>>>
>>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
>>>>> The file will have its original line endings in your working directory.
>>>>> warning: LF will be replaced by CRLF in
>>>>>
>>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
>>>>> The file will have its original line endings in your working directory.
>>>>> warning: LF will be replaced by CRLF in
>>>>>
>>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
>>>>> The file will have its original line endings in your working directory.
>>>>> warning: LF will be replaced by CRLF in
>>>>>
>>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
>>>>> The file will have its original line endings in your working directory.
>>>>> warning: LF will be replaced by CRLF in
>>>>>
>>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
>>>>> The file will have its original line endings in your working directory.
>>>>>
>>>>>
>>>>> *Step 5: git status*
>>>>> On branch develop
>>>>> Your branch is up-to-date with 'origin/develop'.
>>>>> nothing to commit, working tree clean
>>>>>
>>>>>
>>>>> *Step 6: ./gradlew clean build -Dskip.tests=true*
>>>>> BUILD SUCCESSFUL
>>>>>
>>>>> Total time: 5 mins 28.64 secs
>>>>>
>>>>> NOTE: This happens only the first time. I did run the above steps,couple
>>>>> of times on  fresh checkouts and I was able to reproduce it every time.
>>>>>
>>>>> However, after running spotlessApply and git add . the first time, the
>>>>> spotless errors do not reoccur on subsequent builds.
>>>>>
>>>>> I will try running this on other machines and check if this occurs in
>>>>> other windows environments.
>>>>>
>>>>>
>>>>> Regards
>>>>> Naba
>>>>>
>>>>> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
>>>>> wrote:
>>>>>
>>>>> @Jared, I mailed with the Spotless project devs and they recommend using
>>>>> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
>>>>> knows..
>>>>>
>>>>> --Udo
>>>>>
>>>>>
>>>>> On 4/11/16 10:16 am, Jared Stewart wrote:
>>>>>> The only Windows machine I have is running Windows 8, and I am unable
>>> to
>>>>> reproduce this on that machine.  I don\u2019t think .gitattributes would
>>> affect
>>>>> this, since we have already configured spotless to always use Unix line
>>>>> endings.
>>>>>> Naba - Can you run \u2018./gradlew spotlessApply\u2019 and push the results to a
>>>>> branch so I can see what Spotless was complaining about?
>>>>>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
>>>>>>>
>>>>>>> I think we seriously have to look at using .gitattributes for this...
>>>>>>>
>>>>>>> As I initially said, it should be a no brainer.. it should just
>>>>> automatically just work.
>>>>>>> --Udo
>>>>>>>
>>>>>>>
>>>>>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>>>>>>>> It's been working on my Windows 7 machine under a cygwin shell.   I
>>>>> just ran it again using "clean bulid -Dskip.tests=true" from the root
>>> Geode
>>>>> directory on the develop branch.
>>>>>>>> Run spotlessApply and let us know how it modified the files.
>>>>>>>>
>>>>>>>>
>>>>>>>> Le 11/3/2016 � 12:38 PM, Nabarun Nag a �crit :
>>>>>>>>> I tested gradlew build on a windows 10 machine to test the spotless
>>>>> feature.
>>>>>>>>> Steps:
>>>>>>>>> 1.  git clone
>>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>>>>> open
>>>>>>>>> 2. cd open
>>>>>>>>> 3. git checkout -b develop origin/develop
>>>>>>>>> 4.  ./gradlew clean build -Dskip.tests=true
>>>>>>>>>
>>>>>>>>> The build failed with multiple formatting error on each file.
>>>>>>>>>
>>>>>>>>> In my opinion the issue still exists. It will be awesome if someone
>>>>> else
>>>>>>>>> can verify if the issue still exists by running the build steps on a
>>>>>>>>> different windows machine.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> Nabarun
>>>>>>>>>
>>>>>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
>>>>> bschuchardt@pivotal.io>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> The lineEndings setting works great. I've pushed the change to
>>>>> develop
>>>>>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
>>>>> wrote:
>>>>>>>>>>> I think we have a fix for the spotless line ending issue on
>>> windows;
>>>>>>>>>> Bruce
>>>>>>>>>>> will check it in shortly:
>>>>>>>>>>>
>>>>>>>>>>> diff --git a/build.gradle b/build.gradle
>>>>>>>>>>> index a734e05..6e82433 100755
>>>>>>>>>>> --- a/build.gradle
>>>>>>>>>>> +++ b/build.gradle
>>>>>>>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>>>>>>>>
>>>>>>>>>>>    apply plugin: "com.diffplug.gradle.spotless"
>>>>>>>>>>>    spotless {
>>>>>>>>>>> +    lineEndings = 'unix';
>>>>>>>>>>>      java {
>>>>>>>>>>>        eclipseFormatFile
>>>>>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>>>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Running geode-core:spotlessCheck complains that all of the .java
>>>>> files
>>>>>>>>>>>> have format violations
>>>>>>>>>>>>
>>>>>>>>>>>> * What went wrong:
>>>>>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>>>>>>>> them.
>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>>>>>>>> ctionFactoryImpl.java
>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>>>>>>>> GFConnectionImpl.java
>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>> LocalTransaction.java
>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>> ManagedConnection.java
>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>> ManagedConnectionFactory.java
>>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>>> ManagedConnectionnMetaData.java
>>>>>>>>>>>> etc.
>>>>>>>>>>>>
>>>>>>>>>>>> Until this is fixed I can't validate that the changes I check in
>>>>>>>>>> conform
>>>>>>>>>>>> to the formatting rules.
>>>>>>>>>>>>
>>>>>
>>>
>


Re: more spotless problems on Windows

Posted by Jared Stewart <js...@pivotal.io>.
From the spotless devs:

Git is not a pure content store, it mucks with line endings. Regardless of what you check-in, it will store your files with unix line endings in the repo.

Then, when you checkout, it will modify the line endings to suit your platform. Unless you add a .gitattributes file to tell git "forget the platform, do what this file says".

Remove lineEndings 'UNIX' in your build.gradle [Jared - we should put ‘GIT_ATTRIBUTES’ in its place], and add a .gitattributes file in your root directory with the content * text eol=lf and your problem will be fixed.



> On Nov 4, 2016, at 10:48 AM, Nabarun Nag <nn...@pivotal.io> wrote:
> 
> Thank you Jared. I wanted to confirm that this was not an isolated incident
> specific to my machine.
> 
> Regards
> Naba
> 
> On Fri, Nov 4, 2016 at 10:45 AM Jared Stewart <js...@pivotal.io> wrote:
> 
>> @Naba,
>> 
>> I filed a bug report with Spotless this morning.  The Spotless devs have
>> been very responsive so far in my experience, hopefully this will be fixed
>> soon.
>> 
>>> On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
>>> 
>>> @Udo, I confirmed that this is not limited to my windows 10 environment.
>> I
>>> ran  the steps on a Windows Server 2016 AMI instance and the same error
>>> occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
>>> 
>>> I wanted to know if there is a mandate on what the value of
>>> core.autocrlf should
>>> be set to on a windows machine for geode dev work. For my experiments
>> value
>>> of core.autocrlf was set to true. [recommended for cross platform
>>> development]
>>> 
>>> Regards
>>> Naba
>>> 
>>> 
>>> On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
>>> 
>>>> @Jared
>>>> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
>>>> this is what has happened.
>>>> NOTE: I started the below steps on a fresh git clone of the open side.
>>>> [Steps:
>>>> 1.  git clone
>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>> open
>>>> 2. cd open
>>>> 3. git checkout -b develop origin/develop]
>>>> 
>>>> *Step 1. ./gradlew clean build -Dskip.tests=true*
>>>> 
>>>> FAILURE: Build failed with an exception.
>>>> 
>>>> * What went wrong:
>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix them.
>>>> 
>>>> 
>> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
>>>> 
>>>> 
>> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
>>>> 
>>>> 
>> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
>>>> 
>>>> 
>> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
>>>> 
>>>> 
>> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
>>>> 
>>>> 
>>>> *Step 2: ./gradlew spotlessApply*
>>>> 
>>>> BUILD SUCCESSFUL
>>>> 
>>>> Total time: 12.728 secs
>>>> 
>>>> 
>>>> *Step 3: git status*
>>>> 
>>>> modified:
>>>> 
>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
>>>>       modified:
>>>> 
>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
>>>>       modified:
>>>> 
>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
>>>>       modified:
>>>> 
>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
>>>>       modified:
>>>> 
>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
>>>> 
>>>> 
>>>> *Step 4 : git add .*
>>>> warning: LF will be replaced by CRLF in
>>>> 
>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
>>>> The file will have its original line endings in your working directory.
>>>> warning: LF will be replaced by CRLF in
>>>> 
>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
>>>> The file will have its original line endings in your working directory.
>>>> warning: LF will be replaced by CRLF in
>>>> 
>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
>>>> The file will have its original line endings in your working directory.
>>>> warning: LF will be replaced by CRLF in
>>>> 
>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
>>>> The file will have its original line endings in your working directory.
>>>> warning: LF will be replaced by CRLF in
>>>> 
>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
>>>> The file will have its original line endings in your working directory.
>>>> 
>>>> 
>>>> *Step 5: git status*
>>>> On branch develop
>>>> Your branch is up-to-date with 'origin/develop'.
>>>> nothing to commit, working tree clean
>>>> 
>>>> 
>>>> *Step 6: ./gradlew clean build -Dskip.tests=true*
>>>> BUILD SUCCESSFUL
>>>> 
>>>> Total time: 5 mins 28.64 secs
>>>> 
>>>> NOTE: This happens only the first time. I did run the above steps,couple
>>>> of times on  fresh checkouts and I was able to reproduce it every time.
>>>> 
>>>> However, after running spotlessApply and git add . the first time, the
>>>> spotless errors do not reoccur on subsequent builds.
>>>> 
>>>> I will try running this on other machines and check if this occurs in
>>>> other windows environments.
>>>> 
>>>> 
>>>> Regards
>>>> Naba
>>>> 
>>>> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
>>>> wrote:
>>>> 
>>>> @Jared, I mailed with the Spotless project devs and they recommend using
>>>> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
>>>> knows..
>>>> 
>>>> --Udo
>>>> 
>>>> 
>>>> On 4/11/16 10:16 am, Jared Stewart wrote:
>>>>> The only Windows machine I have is running Windows 8, and I am unable
>> to
>>>> reproduce this on that machine.  I don’t think .gitattributes would
>> affect
>>>> this, since we have already configured spotless to always use Unix line
>>>> endings.
>>>>> 
>>>>> Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a
>>>> branch so I can see what Spotless was complaining about?
>>>>> 
>>>>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
>>>>>> 
>>>>>> I think we seriously have to look at using .gitattributes for this...
>>>>>> 
>>>>>> As I initially said, it should be a no brainer.. it should just
>>>> automatically just work.
>>>>>> 
>>>>>> --Udo
>>>>>> 
>>>>>> 
>>>>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>>>>>>> It's been working on my Windows 7 machine under a cygwin shell.   I
>>>> just ran it again using "clean bulid -Dskip.tests=true" from the root
>> Geode
>>>> directory on the develop branch.
>>>>>>> 
>>>>>>> Run spotlessApply and let us know how it modified the files.
>>>>>>> 
>>>>>>> 
>>>>>>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
>>>>>>>> I tested gradlew build on a windows 10 machine to test the spotless
>>>> feature.
>>>>>>>> 
>>>>>>>> Steps:
>>>>>>>> 1.  git clone
>>>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>>>> open
>>>>>>>> 2. cd open
>>>>>>>> 3. git checkout -b develop origin/develop
>>>>>>>> 4.  ./gradlew clean build -Dskip.tests=true
>>>>>>>> 
>>>>>>>> The build failed with multiple formatting error on each file.
>>>>>>>> 
>>>>>>>> In my opinion the issue still exists. It will be awesome if someone
>>>> else
>>>>>>>> can verify if the issue still exists by running the build steps on a
>>>>>>>> different windows machine.
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> Nabarun
>>>>>>>> 
>>>>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
>>>> bschuchardt@pivotal.io>
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> The lineEndings setting works great. I've pushed the change to
>>>> develop
>>>>>>>>> 
>>>>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> I think we have a fix for the spotless line ending issue on
>> windows;
>>>>>>>>> Bruce
>>>>>>>>>> will check it in shortly:
>>>>>>>>>> 
>>>>>>>>>> diff --git a/build.gradle b/build.gradle
>>>>>>>>>> index a734e05..6e82433 100755
>>>>>>>>>> --- a/build.gradle
>>>>>>>>>> +++ b/build.gradle
>>>>>>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>>>>>>> 
>>>>>>>>>>   apply plugin: "com.diffplug.gradle.spotless"
>>>>>>>>>>   spotless {
>>>>>>>>>> +    lineEndings = 'unix';
>>>>>>>>>>     java {
>>>>>>>>>>       eclipseFormatFile
>>>>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>>>>>>> bschuchardt@pivotal.io>
>>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> Running geode-core:spotlessCheck complains that all of the .java
>>>> files
>>>>>>>>>>> have format violations
>>>>>>>>>>> 
>>>>>>>>>>> * What went wrong:
>>>>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>>>>>>> them.
>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>>>>>>> ctionFactoryImpl.java
>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>>>>>>> GFConnectionImpl.java
>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>> LocalTransaction.java
>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>> ManagedConnection.java
>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>> ManagedConnectionFactory.java
>>>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>>>> ManagedConnectionnMetaData.java
>>>>>>>>>>> etc.
>>>>>>>>>>> 
>>>>>>>>>>> Until this is fixed I can't validate that the changes I check in
>>>>>>>>> conform
>>>>>>>>>>> to the formatting rules.
>>>>>>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: more spotless problems on Windows

Posted by Nabarun Nag <nn...@pivotal.io>.
Thank you Jared. I wanted to confirm that this was not an isolated incident
specific to my machine.

Regards
Naba

On Fri, Nov 4, 2016 at 10:45 AM Jared Stewart <js...@pivotal.io> wrote:

> @Naba,
>
> I filed a bug report with Spotless this morning.  The Spotless devs have
> been very responsive so far in my experience, hopefully this will be fixed
> soon.
>
> > On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
> >
> > @Udo, I confirmed that this is not limited to my windows 10 environment.
> I
> > ran  the steps on a Windows Server 2016 AMI instance and the same error
> > occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
> >
> > I wanted to know if there is a mandate on what the value of
> > core.autocrlf should
> > be set to on a windows machine for geode dev work. For my experiments
> value
> > of core.autocrlf was set to true. [recommended for cross platform
> > development]
> >
> > Regards
> > Naba
> >
> >
> > On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
> >
> >> @Jared
> >> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
> >> this is what has happened.
> >> NOTE: I started the below steps on a fresh git clone of the open side.
> >> [Steps:
> >> 1.  git clone
> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> >> open
> >> 2. cd open
> >> 3. git checkout -b develop origin/develop]
> >>
> >> *Step 1. ./gradlew clean build -Dskip.tests=true*
> >>
> >> FAILURE: Build failed with an exception.
> >>
> >> * What went wrong:
> >> Execution failed for task ':geode-core:spotlessJavaCheck'.
> >>> Format violations were found. Run 'gradlew spotlessApply' to fix them.
> >>
> >>
> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
> >>
> >>
> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
> >>
> >>
> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
> >>
> >>
> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
> >>
> >>
> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
> >>
> >>
> >> *Step 2: ./gradlew spotlessApply*
> >>
> >> BUILD SUCCESSFUL
> >>
> >> Total time: 12.728 secs
> >>
> >>
> >> *Step 3: git status*
> >>
> >> modified:
> >>
> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
> >>        modified:
> >>
> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
> >>        modified:
> >>
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
> >>        modified:
> >>
> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
> >>        modified:
> >>
> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
> >>
> >>
> >> *Step 4 : git add .*
> >> warning: LF will be replaced by CRLF in
> >>
> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
> >> The file will have its original line endings in your working directory.
> >> warning: LF will be replaced by CRLF in
> >>
> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
> >> The file will have its original line endings in your working directory.
> >> warning: LF will be replaced by CRLF in
> >>
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
> >> The file will have its original line endings in your working directory.
> >> warning: LF will be replaced by CRLF in
> >>
> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
> >> The file will have its original line endings in your working directory.
> >> warning: LF will be replaced by CRLF in
> >>
> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
> >> The file will have its original line endings in your working directory.
> >>
> >>
> >> *Step 5: git status*
> >> On branch develop
> >> Your branch is up-to-date with 'origin/develop'.
> >> nothing to commit, working tree clean
> >>
> >>
> >> *Step 6: ./gradlew clean build -Dskip.tests=true*
> >> BUILD SUCCESSFUL
> >>
> >> Total time: 5 mins 28.64 secs
> >>
> >> NOTE: This happens only the first time. I did run the above steps,couple
> >> of times on  fresh checkouts and I was able to reproduce it every time.
> >>
> >> However, after running spotlessApply and git add . the first time, the
> >> spotless errors do not reoccur on subsequent builds.
> >>
> >> I will try running this on other machines and check if this occurs in
> >> other windows environments.
> >>
> >>
> >> Regards
> >> Naba
> >>
> >> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
> >> wrote:
> >>
> >> @Jared, I mailed with the Spotless project devs and they recommend using
> >> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
> >> knows..
> >>
> >> --Udo
> >>
> >>
> >> On 4/11/16 10:16 am, Jared Stewart wrote:
> >>> The only Windows machine I have is running Windows 8, and I am unable
> to
> >> reproduce this on that machine.  I don’t think .gitattributes would
> affect
> >> this, since we have already configured spotless to always use Unix line
> >> endings.
> >>>
> >>> Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a
> >> branch so I can see what Spotless was complaining about?
> >>>
> >>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
> >>>>
> >>>> I think we seriously have to look at using .gitattributes for this...
> >>>>
> >>>> As I initially said, it should be a no brainer.. it should just
> >> automatically just work.
> >>>>
> >>>> --Udo
> >>>>
> >>>>
> >>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
> >>>>> It's been working on my Windows 7 machine under a cygwin shell.   I
> >> just ran it again using "clean bulid -Dskip.tests=true" from the root
> Geode
> >> directory on the develop branch.
> >>>>>
> >>>>> Run spotlessApply and let us know how it modified the files.
> >>>>>
> >>>>>
> >>>>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
> >>>>>> I tested gradlew build on a windows 10 machine to test the spotless
> >> feature.
> >>>>>>
> >>>>>> Steps:
> >>>>>> 1.  git clone
> >> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> >>>>>> open
> >>>>>> 2. cd open
> >>>>>> 3. git checkout -b develop origin/develop
> >>>>>> 4.  ./gradlew clean build -Dskip.tests=true
> >>>>>>
> >>>>>> The build failed with multiple formatting error on each file.
> >>>>>>
> >>>>>> In my opinion the issue still exists. It will be awesome if someone
> >> else
> >>>>>> can verify if the issue still exists by running the build steps on a
> >>>>>> different windows machine.
> >>>>>>
> >>>>>> Regards
> >>>>>> Nabarun
> >>>>>>
> >>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
> >> bschuchardt@pivotal.io>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> The lineEndings setting works great. I've pushed the change to
> >> develop
> >>>>>>>
> >>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
> >> wrote:
> >>>>>>>
> >>>>>>>> I think we have a fix for the spotless line ending issue on
> windows;
> >>>>>>> Bruce
> >>>>>>>> will check it in shortly:
> >>>>>>>>
> >>>>>>>> diff --git a/build.gradle b/build.gradle
> >>>>>>>> index a734e05..6e82433 100755
> >>>>>>>> --- a/build.gradle
> >>>>>>>> +++ b/build.gradle
> >>>>>>>> @@ -88,6 +88,7 @@ subprojects {
> >>>>>>>>
> >>>>>>>>    apply plugin: "com.diffplug.gradle.spotless"
> >>>>>>>>    spotless {
> >>>>>>>> +    lineEndings = 'unix';
> >>>>>>>>      java {
> >>>>>>>>        eclipseFormatFile
> >>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
> >>>>>>> bschuchardt@pivotal.io>
> >>>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> Running geode-core:spotlessCheck complains that all of the .java
> >> files
> >>>>>>>>> have format violations
> >>>>>>>>>
> >>>>>>>>> * What went wrong:
> >>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
> >>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
> >>>>>>> them.
> >>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
> >>>>>>>>> ctionFactoryImpl.java
> >>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
> >>>>>>>> GFConnectionImpl.java
> >>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>> LocalTransaction.java
> >>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>> ManagedConnection.java
> >>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>> ManagedConnectionFactory.java
> >>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>>>> ManagedConnectionnMetaData.java
> >>>>>>>>> etc.
> >>>>>>>>>
> >>>>>>>>> Until this is fixed I can't validate that the changes I check in
> >>>>>>> conform
> >>>>>>>>> to the formatting rules.
> >>>>>>>>>
> >>
> >>
>
>

Re: more spotless problems on Windows

Posted by Jared Stewart <js...@pivotal.io>.
@Naba,  

I filed a bug report with Spotless this morning.  The Spotless devs have been very responsive so far in my experience, hopefully this will be fixed soon.

> On Nov 4, 2016, at 10:35 AM, Nabarun Nag <nn...@pivotal.io> wrote:
> 
> @Udo, I confirmed that this is not limited to my windows 10 environment. I
> ran  the steps on a Windows Server 2016 AMI instance and the same error
> occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]
> 
> I wanted to know if there is a mandate on what the value of
> core.autocrlf should
> be set to on a windows machine for geode dev work. For my experiments value
> of core.autocrlf was set to true. [recommended for cross platform
> development]
> 
> Regards
> Naba
> 
> 
> On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:
> 
>> @Jared
>> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
>> this is what has happened.
>> NOTE: I started the below steps on a fresh git clone of the open side.
>> [Steps:
>> 1.  git clone https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>> open
>> 2. cd open
>> 3. git checkout -b develop origin/develop]
>> 
>> *Step 1. ./gradlew clean build -Dskip.tests=true*
>> 
>> FAILURE: Build failed with an exception.
>> 
>> * What went wrong:
>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>> Format violations were found. Run 'gradlew spotlessApply' to fix them.
>> 
>> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
>> 
>> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
>> 
>> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
>> 
>> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
>> 
>> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
>> 
>> 
>> *Step 2: ./gradlew spotlessApply*
>> 
>> BUILD SUCCESSFUL
>> 
>> Total time: 12.728 secs
>> 
>> 
>> *Step 3: git status*
>> 
>> modified:
>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
>>        modified:
>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
>>        modified:
>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
>>        modified:
>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
>>        modified:
>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
>> 
>> 
>> *Step 4 : git add .*
>> warning: LF will be replaced by CRLF in
>> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
>> The file will have its original line endings in your working directory.
>> warning: LF will be replaced by CRLF in
>> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
>> The file will have its original line endings in your working directory.
>> warning: LF will be replaced by CRLF in
>> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
>> The file will have its original line endings in your working directory.
>> warning: LF will be replaced by CRLF in
>> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
>> The file will have its original line endings in your working directory.
>> warning: LF will be replaced by CRLF in
>> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
>> The file will have its original line endings in your working directory.
>> 
>> 
>> *Step 5: git status*
>> On branch develop
>> Your branch is up-to-date with 'origin/develop'.
>> nothing to commit, working tree clean
>> 
>> 
>> *Step 6: ./gradlew clean build -Dskip.tests=true*
>> BUILD SUCCESSFUL
>> 
>> Total time: 5 mins 28.64 secs
>> 
>> NOTE: This happens only the first time. I did run the above steps,couple
>> of times on  fresh checkouts and I was able to reproduce it every time.
>> 
>> However, after running spotlessApply and git add . the first time, the
>> spotless errors do not reoccur on subsequent builds.
>> 
>> I will try running this on other machines and check if this occurs in
>> other windows environments.
>> 
>> 
>> Regards
>> Naba
>> 
>> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
>> wrote:
>> 
>> @Jared, I mailed with the Spotless project devs and they recommend using
>> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
>> knows..
>> 
>> --Udo
>> 
>> 
>> On 4/11/16 10:16 am, Jared Stewart wrote:
>>> The only Windows machine I have is running Windows 8, and I am unable to
>> reproduce this on that machine.  I don’t think .gitattributes would affect
>> this, since we have already configured spotless to always use Unix line
>> endings.
>>> 
>>> Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a
>> branch so I can see what Spotless was complaining about?
>>> 
>>>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
>>>> 
>>>> I think we seriously have to look at using .gitattributes for this...
>>>> 
>>>> As I initially said, it should be a no brainer.. it should just
>> automatically just work.
>>>> 
>>>> --Udo
>>>> 
>>>> 
>>>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>>>>> It's been working on my Windows 7 machine under a cygwin shell.   I
>> just ran it again using "clean bulid -Dskip.tests=true" from the root Geode
>> directory on the develop branch.
>>>>> 
>>>>> Run spotlessApply and let us know how it modified the files.
>>>>> 
>>>>> 
>>>>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
>>>>>> I tested gradlew build on a windows 10 machine to test the spotless
>> feature.
>>>>>> 
>>>>>> Steps:
>>>>>> 1.  git clone
>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>>>> open
>>>>>> 2. cd open
>>>>>> 3. git checkout -b develop origin/develop
>>>>>> 4.  ./gradlew clean build -Dskip.tests=true
>>>>>> 
>>>>>> The build failed with multiple formatting error on each file.
>>>>>> 
>>>>>> In my opinion the issue still exists. It will be awesome if someone
>> else
>>>>>> can verify if the issue still exists by running the build steps on a
>>>>>> different windows machine.
>>>>>> 
>>>>>> Regards
>>>>>> Nabarun
>>>>>> 
>>>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
>> bschuchardt@pivotal.io>
>>>>>> wrote:
>>>>>> 
>>>>>>> The lineEndings setting works great. I've pushed the change to
>> develop
>>>>>>> 
>>>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
>> wrote:
>>>>>>> 
>>>>>>>> I think we have a fix for the spotless line ending issue on windows;
>>>>>>> Bruce
>>>>>>>> will check it in shortly:
>>>>>>>> 
>>>>>>>> diff --git a/build.gradle b/build.gradle
>>>>>>>> index a734e05..6e82433 100755
>>>>>>>> --- a/build.gradle
>>>>>>>> +++ b/build.gradle
>>>>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>>>>> 
>>>>>>>>    apply plugin: "com.diffplug.gradle.spotless"
>>>>>>>>    spotless {
>>>>>>>> +    lineEndings = 'unix';
>>>>>>>>      java {
>>>>>>>>        eclipseFormatFile
>>>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>>>>> bschuchardt@pivotal.io>
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> Running geode-core:spotlessCheck complains that all of the .java
>> files
>>>>>>>>> have format violations
>>>>>>>>> 
>>>>>>>>> * What went wrong:
>>>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>>>>> them.
>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>>>>> ctionFactoryImpl.java
>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>>>>> GFConnectionImpl.java
>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>> LocalTransaction.java
>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>> ManagedConnection.java
>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>> ManagedConnectionFactory.java
>>>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>>>> ManagedConnectionnMetaData.java
>>>>>>>>> etc.
>>>>>>>>> 
>>>>>>>>> Until this is fixed I can't validate that the changes I check in
>>>>>>> conform
>>>>>>>>> to the formatting rules.
>>>>>>>>> 
>> 
>> 


Re: more spotless problems on Windows

Posted by Nabarun Nag <nn...@pivotal.io>.
@Udo, I confirmed that this is not limited to my windows 10 environment. I
ran  the steps on a Windows Server 2016 AMI instance and the same error
occurred in the AMI too. [source checkout time 4th Nov 10:00AM PST]

I wanted to know if there is a mandate on what the value of
core.autocrlf should
be set to on a windows machine for geode dev work. For my experiments value
of core.autocrlf was set to true. [recommended for cross platform
development]

Regards
Naba


On Thu, Nov 3, 2016 at 10:18 PM Nabarun Nag <nn...@pivotal.io> wrote:

> @Jared
> I ran ./gradlew spotlessApply on the Windows 10 machine using git bash
> this is what has happened.
> NOTE: I started the below steps on a fresh git clone of the open side.
> [Steps:
> 1.  git clone https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> open
> 2. cd open
> 3. git checkout -b develop origin/develop]
>
> *Step 1. ./gradlew clean build -Dskip.tests=true*
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':geode-core:spotlessJavaCheck'.
> > Format violations were found. Run 'gradlew spotlessApply' to fix them.
>
> geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java
>
> geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java
>
> geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java
>
> geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java
>
> geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java
>
>
> *Step 2: ./gradlew spotlessApply*
>
> BUILD SUCCESSFUL
>
> Total time: 12.728 secs
>
>
> *Step 3: git status*
>
>  modified:
> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
>         modified:
> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
>         modified:
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
>         modified:
> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
>         modified:
> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
>
>
> *Step 4 : git add .*
> warning: LF will be replaced by CRLF in
> geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
> The file will have its original line endings in your working directory.
> warning: LF will be replaced by CRLF in
> geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
> The file will have its original line endings in your working directory.
> warning: LF will be replaced by CRLF in
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
> The file will have its original line endings in your working directory.
> warning: LF will be replaced by CRLF in
> geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
> The file will have its original line endings in your working directory.
> warning: LF will be replaced by CRLF in
> geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
> The file will have its original line endings in your working directory.
>
>
> *Step 5: git status*
> On branch develop
> Your branch is up-to-date with 'origin/develop'.
> nothing to commit, working tree clean
>
>
> *Step 6: ./gradlew clean build -Dskip.tests=true*
> BUILD SUCCESSFUL
>
> Total time: 5 mins 28.64 secs
>
> NOTE: This happens only the first time. I did run the above steps,couple
> of times on  fresh checkouts and I was able to reproduce it every time.
>
> However, after running spotlessApply and git add . the first time, the
> spotless errors do not reoccur on subsequent builds.
>
> I will try running this on other machines and check if this occurs in
> other windows environments.
>
>
> Regards
> Naba
>
> On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io>
> wrote:
>
> @Jared, I mailed with the Spotless project devs and they recommend using
> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
> knows..
>
> --Udo
>
>
> On 4/11/16 10:16 am, Jared Stewart wrote:
> > The only Windows machine I have is running Windows 8, and I am unable to
> reproduce this on that machine.  I don’t think .gitattributes would affect
> this, since we have already configured spotless to always use Unix line
> endings.
> >
> > Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a
> branch so I can see what Spotless was complaining about?
> >
> >> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
> >>
> >> I think we seriously have to look at using .gitattributes for this...
> >>
> >> As I initially said, it should be a no brainer.. it should just
> automatically just work.
> >>
> >> --Udo
> >>
> >>
> >> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
> >>> It's been working on my Windows 7 machine under a cygwin shell.   I
> just ran it again using "clean bulid -Dskip.tests=true" from the root Geode
> directory on the develop branch.
> >>>
> >>> Run spotlessApply and let us know how it modified the files.
> >>>
> >>>
> >>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
> >>>> I tested gradlew build on a windows 10 machine to test the spotless
> feature.
> >>>>
> >>>> Steps:
> >>>> 1.  git clone
> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> >>>> open
> >>>> 2. cd open
> >>>> 3. git checkout -b develop origin/develop
> >>>> 4.  ./gradlew clean build -Dskip.tests=true
> >>>>
> >>>> The build failed with multiple formatting error on each file.
> >>>>
> >>>> In my opinion the issue still exists. It will be awesome if someone
> else
> >>>> can verify if the issue still exists by running the build steps on a
> >>>> different windows machine.
> >>>>
> >>>> Regards
> >>>> Nabarun
> >>>>
> >>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
> bschuchardt@pivotal.io>
> >>>> wrote:
> >>>>
> >>>>> The lineEndings setting works great. I've pushed the change to
> develop
> >>>>>
> >>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
> wrote:
> >>>>>
> >>>>>> I think we have a fix for the spotless line ending issue on windows;
> >>>>> Bruce
> >>>>>> will check it in shortly:
> >>>>>>
> >>>>>> diff --git a/build.gradle b/build.gradle
> >>>>>> index a734e05..6e82433 100755
> >>>>>> --- a/build.gradle
> >>>>>> +++ b/build.gradle
> >>>>>> @@ -88,6 +88,7 @@ subprojects {
> >>>>>>
> >>>>>>     apply plugin: "com.diffplug.gradle.spotless"
> >>>>>>     spotless {
> >>>>>> +    lineEndings = 'unix';
> >>>>>>       java {
> >>>>>>         eclipseFormatFile
> >>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
> >>>>>>
> >>>>>>
> >>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
> >>>>> bschuchardt@pivotal.io>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Running geode-core:spotlessCheck complains that all of the .java
> files
> >>>>>>> have format violations
> >>>>>>>
> >>>>>>> * What went wrong:
> >>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
> >>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
> >>>>> them.
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
> >>>>>>> ctionFactoryImpl.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
> >>>>>> GFConnectionImpl.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> LocalTransaction.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> ManagedConnection.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> ManagedConnectionFactory.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> ManagedConnectionnMetaData.java
> >>>>>>> etc.
> >>>>>>>
> >>>>>>> Until this is fixed I can't validate that the changes I check in
> >>>>> conform
> >>>>>>> to the formatting rules.
> >>>>>>>
>
>

Re: more spotless problems on Windows

Posted by Nabarun Nag <nn...@pivotal.io>.
@Jared
I ran ./gradlew spotlessApply on the Windows 10 machine using git bash this
is what has happened.
NOTE: I started the below steps on a fresh git clone of the open side.
[Steps:
1.  git clone https://git-wip-us.apache.org/repos/asf/incubator-geode.git
open
2. cd open
3. git checkout -b develop origin/develop]

*Step 1. ./gradlew clean build -Dskip.tests=true*

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':geode-core:spotlessJavaCheck'.
> Format violations were found. Run 'gradlew spotlessApply' to fix them.

geode-core\src\main\java\org\apache\geode\internal\statistics\StatArchiveReader.java

geode-core\src\test\java\org\apache\geode\cache\query\dunit\PdxLocalQueryVersionedClassDUnitTest.java

geode-core\src\test\java\org\apache\geode\internal\cache\execute\ClientServerFunctionExecutionDUnitTest.java

geode-core\src\test\java\org\apache\geode\internal\cache\functions\TestFunction.java

geode-core\src\test\java\org\apache\geode\internal\statistics\StatArchiveWithMissingResourceTypeRegressionTest.java


*Step 2: ./gradlew spotlessApply*

BUILD SUCCESSFUL

Total time: 12.728 secs


*Step 3: git status*

 modified:
geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
        modified:
geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java
        modified:
geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java
        modified:
geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java
        modified:
geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java


*Step 4 : git add .*
warning: LF will be replaced by CRLF in
geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in
geode-core/src/test/java/org/apache/geode/cache/query/dunit/PdxLocalQueryVersionedClassDUnitTest.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in
geode-core/src/test/java/org/apache/geode/internal/cache/execute/ClientServerFunctionExecutionDUnitTest.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in
geode-core/src/test/java/org/apache/geode/internal/cache/functions/TestFunction.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in
geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java.
The file will have its original line endings in your working directory.


*Step 5: git status*
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working tree clean


*Step 6: ./gradlew clean build -Dskip.tests=true*
BUILD SUCCESSFUL

Total time: 5 mins 28.64 secs

NOTE: This happens only the first time. I did run the above steps,couple of
times on  fresh checkouts and I was able to reproduce it every time.

However, after running spotlessApply and git add . the first time, the
spotless errors do not reoccur on subsequent builds.

I will try running this on other machines and check if this occurs in other
windows environments.


Regards
Naba

On Thu, Nov 3, 2016 at 4:25 PM Udo Kohlmeyer <uk...@pivotal.io> wrote:

> @Jared, I mailed with the Spotless project devs and they recommend using
> .gitattributes. But maybe @Naba's problem is Windows10 related... Who
> knows..
>
> --Udo
>
>
> On 4/11/16 10:16 am, Jared Stewart wrote:
> > The only Windows machine I have is running Windows 8, and I am unable to
> reproduce this on that machine.  I don’t think .gitattributes would affect
> this, since we have already configured spotless to always use Unix line
> endings.
> >
> > Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a
> branch so I can see what Spotless was complaining about?
> >
> >> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
> >>
> >> I think we seriously have to look at using .gitattributes for this...
> >>
> >> As I initially said, it should be a no brainer.. it should just
> automatically just work.
> >>
> >> --Udo
> >>
> >>
> >> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
> >>> It's been working on my Windows 7 machine under a cygwin shell.   I
> just ran it again using "clean bulid -Dskip.tests=true" from the root Geode
> directory on the develop branch.
> >>>
> >>> Run spotlessApply and let us know how it modified the files.
> >>>
> >>>
> >>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
> >>>> I tested gradlew build on a windows 10 machine to test the spotless
> feature.
> >>>>
> >>>> Steps:
> >>>> 1.  git clone
> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> >>>> open
> >>>> 2. cd open
> >>>> 3. git checkout -b develop origin/develop
> >>>> 4.  ./gradlew clean build -Dskip.tests=true
> >>>>
> >>>> The build failed with multiple formatting error on each file.
> >>>>
> >>>> In my opinion the issue still exists. It will be awesome if someone
> else
> >>>> can verify if the issue still exists by running the build steps on a
> >>>> different windows machine.
> >>>>
> >>>> Regards
> >>>> Nabarun
> >>>>
> >>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <
> bschuchardt@pivotal.io>
> >>>> wrote:
> >>>>
> >>>>> The lineEndings setting works great. I've pushed the change to
> develop
> >>>>>
> >>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io>
> wrote:
> >>>>>
> >>>>>> I think we have a fix for the spotless line ending issue on windows;
> >>>>> Bruce
> >>>>>> will check it in shortly:
> >>>>>>
> >>>>>> diff --git a/build.gradle b/build.gradle
> >>>>>> index a734e05..6e82433 100755
> >>>>>> --- a/build.gradle
> >>>>>> +++ b/build.gradle
> >>>>>> @@ -88,6 +88,7 @@ subprojects {
> >>>>>>
> >>>>>>     apply plugin: "com.diffplug.gradle.spotless"
> >>>>>>     spotless {
> >>>>>> +    lineEndings = 'unix';
> >>>>>>       java {
> >>>>>>         eclipseFormatFile
> >>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
> >>>>>>
> >>>>>>
> >>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
> >>>>> bschuchardt@pivotal.io>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Running geode-core:spotlessCheck complains that all of the .java
> files
> >>>>>>> have format violations
> >>>>>>>
> >>>>>>> * What went wrong:
> >>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
> >>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
> >>>>> them.
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
> >>>>>>> ctionFactoryImpl.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
> >>>>>> GFConnectionImpl.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> LocalTransaction.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> ManagedConnection.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> ManagedConnectionFactory.java
> >>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> >>>>>>> ManagedConnectionnMetaData.java
> >>>>>>> etc.
> >>>>>>>
> >>>>>>> Until this is fixed I can't validate that the changes I check in
> >>>>> conform
> >>>>>>> to the formatting rules.
> >>>>>>>
>
>

Re: more spotless problems on Windows

Posted by Udo Kohlmeyer <uk...@pivotal.io>.
@Jared, I mailed with the Spotless project devs and they recommend using 
.gitattributes. But maybe @Naba's problem is Windows10 related... Who 
knows..

--Udo


On 4/11/16 10:16 am, Jared Stewart wrote:
> The only Windows machine I have is running Windows 8, and I am unable to reproduce this on that machine.  I don\u2019t think .gitattributes would affect this, since we have already configured spotless to always use Unix line endings.
>
> Naba - Can you run \u2018./gradlew spotlessApply\u2019 and push the results to a branch so I can see what Spotless was complaining about?
>
>> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
>>
>> I think we seriously have to look at using .gitattributes for this...
>>
>> As I initially said, it should be a no brainer.. it should just automatically just work.
>>
>> --Udo
>>
>>
>> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>>> It's been working on my Windows 7 machine under a cygwin shell.   I just ran it again using "clean bulid -Dskip.tests=true" from the root Geode directory on the develop branch.
>>>
>>> Run spotlessApply and let us know how it modified the files.
>>>
>>>
>>> Le 11/3/2016 � 12:38 PM, Nabarun Nag a �crit :
>>>> I tested gradlew build on a windows 10 machine to test the spotless feature.
>>>>
>>>> Steps:
>>>> 1.  git clone https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>>> open
>>>> 2. cd open
>>>> 3. git checkout -b develop origin/develop
>>>> 4.  ./gradlew clean build -Dskip.tests=true
>>>>
>>>> The build failed with multiple formatting error on each file.
>>>>
>>>> In my opinion the issue still exists. It will be awesome if someone else
>>>> can verify if the issue still exists by running the build steps on a
>>>> different windows machine.
>>>>
>>>> Regards
>>>> Nabarun
>>>>
>>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <bs...@pivotal.io>
>>>> wrote:
>>>>
>>>>> The lineEndings setting works great. I've pushed the change to develop
>>>>>
>>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io> wrote:
>>>>>
>>>>>> I think we have a fix for the spotless line ending issue on windows;
>>>>> Bruce
>>>>>> will check it in shortly:
>>>>>>
>>>>>> diff --git a/build.gradle b/build.gradle
>>>>>> index a734e05..6e82433 100755
>>>>>> --- a/build.gradle
>>>>>> +++ b/build.gradle
>>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>>>
>>>>>>     apply plugin: "com.diffplug.gradle.spotless"
>>>>>>     spotless {
>>>>>> +    lineEndings = 'unix';
>>>>>>       java {
>>>>>>         eclipseFormatFile
>>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>>>
>>>>>>
>>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>>> bschuchardt@pivotal.io>
>>>>>> wrote:
>>>>>>
>>>>>>> Running geode-core:spotlessCheck complains that all of the .java files
>>>>>>> have format violations
>>>>>>>
>>>>>>> * What went wrong:
>>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>>> them.
>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>>> ctionFactoryImpl.java
>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>>> GFConnectionImpl.java
>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>> LocalTransaction.java
>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>> ManagedConnection.java
>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>> ManagedConnectionFactory.java
>>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>>> ManagedConnectionnMetaData.java
>>>>>>> etc.
>>>>>>>
>>>>>>> Until this is fixed I can't validate that the changes I check in
>>>>> conform
>>>>>>> to the formatting rules.
>>>>>>>


Re: more spotless problems on Windows

Posted by Jared Stewart <js...@pivotal.io>.
The only Windows machine I have is running Windows 8, and I am unable to reproduce this on that machine.  I don’t think .gitattributes would affect this, since we have already configured spotless to always use Unix line endings.  

Naba - Can you run ‘./gradlew spotlessApply’ and push the results to a branch so I can see what Spotless was complaining about?

> On Nov 3, 2016, at 4:09 PM, Udo Kohlmeyer <ud...@apache.org> wrote:
> 
> I think we seriously have to look at using .gitattributes for this...
> 
> As I initially said, it should be a no brainer.. it should just automatically just work.
> 
> --Udo
> 
> 
> On 4/11/16 9:00 am, Bruce Schuchardt wrote:
>> It's been working on my Windows 7 machine under a cygwin shell.   I just ran it again using "clean bulid -Dskip.tests=true" from the root Geode directory on the develop branch.
>> 
>> Run spotlessApply and let us know how it modified the files.
>> 
>> 
>> Le 11/3/2016 à 12:38 PM, Nabarun Nag a écrit :
>>> I tested gradlew build on a windows 10 machine to test the spotless feature.
>>> 
>>> Steps:
>>> 1.  git clone https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>>> open
>>> 2. cd open
>>> 3. git checkout -b develop origin/develop
>>> 4.  ./gradlew clean build -Dskip.tests=true
>>> 
>>> The build failed with multiple formatting error on each file.
>>> 
>>> In my opinion the issue still exists. It will be awesome if someone else
>>> can verify if the issue still exists by running the build steps on a
>>> different windows machine.
>>> 
>>> Regards
>>> Nabarun
>>> 
>>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <bs...@pivotal.io>
>>> wrote:
>>> 
>>>> The lineEndings setting works great. I've pushed the change to develop
>>>> 
>>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io> wrote:
>>>> 
>>>>> I think we have a fix for the spotless line ending issue on windows;
>>>> Bruce
>>>>> will check it in shortly:
>>>>> 
>>>>> diff --git a/build.gradle b/build.gradle
>>>>> index a734e05..6e82433 100755
>>>>> --- a/build.gradle
>>>>> +++ b/build.gradle
>>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>> 
>>>>>    apply plugin: "com.diffplug.gradle.spotless"
>>>>>    spotless {
>>>>> +    lineEndings = 'unix';
>>>>>      java {
>>>>>        eclipseFormatFile
>>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>> 
>>>>> 
>>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>>> bschuchardt@pivotal.io>
>>>>> wrote:
>>>>> 
>>>>>> Running geode-core:spotlessCheck complains that all of the .java files
>>>>>> have format violations
>>>>>> 
>>>>>> * What went wrong:
>>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>>> them.
>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>>> ctionFactoryImpl.java
>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>>> GFConnectionImpl.java
>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>> LocalTransaction.java
>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>> ManagedConnection.java
>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>> ManagedConnectionFactory.java
>>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>>> ManagedConnectionnMetaData.java
>>>>>> etc.
>>>>>> 
>>>>>> Until this is fixed I can't validate that the changes I check in
>>>> conform
>>>>>> to the formatting rules.
>>>>>> 
>> 
> 


Re: more spotless problems on Windows

Posted by Udo Kohlmeyer <ud...@apache.org>.
I think we seriously have to look at using .gitattributes for this...

As I initially said, it should be a no brainer.. it should just 
automatically just work.

--Udo


On 4/11/16 9:00 am, Bruce Schuchardt wrote:
> It's been working on my Windows 7 machine under a cygwin shell.   I 
> just ran it again using "clean bulid -Dskip.tests=true" from the root 
> Geode directory on the develop branch.
>
> Run spotlessApply and let us know how it modified the files.
>
>
> Le 11/3/2016 � 12:38 PM, Nabarun Nag a �crit :
>> I tested gradlew build on a windows 10 machine to test the spotless 
>> feature.
>>
>> Steps:
>> 1.  git clone 
>> https://git-wip-us.apache.org/repos/asf/incubator-geode.git
>> open
>> 2. cd open
>> 3. git checkout -b develop origin/develop
>> 4.  ./gradlew clean build -Dskip.tests=true
>>
>> The build failed with multiple formatting error on each file.
>>
>> In my opinion the issue still exists. It will be awesome if someone else
>> can verify if the issue still exists by running the build steps on a
>> different windows machine.
>>
>> Regards
>> Nabarun
>>
>> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt 
>> <bs...@pivotal.io>
>> wrote:
>>
>>> The lineEndings setting works great. I've pushed the change to develop
>>>
>>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io> wrote:
>>>
>>>> I think we have a fix for the spotless line ending issue on windows;
>>> Bruce
>>>> will check it in shortly:
>>>>
>>>> diff --git a/build.gradle b/build.gradle
>>>> index a734e05..6e82433 100755
>>>> --- a/build.gradle
>>>> +++ b/build.gradle
>>>> @@ -88,6 +88,7 @@ subprojects {
>>>>
>>>>     apply plugin: "com.diffplug.gradle.spotless"
>>>>     spotless {
>>>> +    lineEndings = 'unix';
>>>>       java {
>>>>         eclipseFormatFile
>>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>>
>>>>
>>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>>> bschuchardt@pivotal.io>
>>>> wrote:
>>>>
>>>>> Running geode-core:spotlessCheck complains that all of the .java 
>>>>> files
>>>>> have format violations
>>>>>
>>>>> * What went wrong:
>>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>>> them.
>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>>> ctionFactoryImpl.java
>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>>> GFConnectionImpl.java
>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>> LocalTransaction.java
>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>> ManagedConnection.java
>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>> ManagedConnectionFactory.java
>>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>>> ManagedConnectionnMetaData.java
>>>>> etc.
>>>>>
>>>>> Until this is fixed I can't validate that the changes I check in
>>> conform
>>>>> to the formatting rules.
>>>>>
>


Re: more spotless problems on Windows

Posted by Bruce Schuchardt <bs...@pivotal.io>.
It's been working on my Windows 7 machine under a cygwin shell.   I just 
ran it again using "clean bulid -Dskip.tests=true" from the root Geode 
directory on the develop branch.

Run spotlessApply and let us know how it modified the files.


Le 11/3/2016 � 12:38 PM, Nabarun Nag a �crit :
> I tested gradlew build on a windows 10 machine to test the spotless feature.
>
> Steps:
> 1.  git clone https://git-wip-us.apache.org/repos/asf/incubator-geode.git
> open
> 2. cd open
> 3. git checkout -b develop origin/develop
> 4.  ./gradlew clean build -Dskip.tests=true
>
> The build failed with multiple formatting error on each file.
>
> In my opinion the issue still exists. It will be awesome if someone else
> can verify if the issue still exists by running the build steps on a
> different windows machine.
>
> Regards
> Nabarun
>
> On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <bs...@pivotal.io>
> wrote:
>
>> The lineEndings setting works great.  I've pushed the change to develop
>>
>> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io> wrote:
>>
>>> I think we have a fix for the spotless line ending issue on windows;
>> Bruce
>>> will check it in shortly:
>>>
>>> diff --git a/build.gradle b/build.gradle
>>> index a734e05..6e82433 100755
>>> --- a/build.gradle
>>> +++ b/build.gradle
>>> @@ -88,6 +88,7 @@ subprojects {
>>>
>>>     apply plugin: "com.diffplug.gradle.spotless"
>>>     spotless {
>>> +    lineEndings = 'unix';
>>>       java {
>>>         eclipseFormatFile
>>> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>>>
>>>
>>> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
>> bschuchardt@pivotal.io>
>>> wrote:
>>>
>>>> Running geode-core:spotlessCheck complains that all of the .java files
>>>> have format violations
>>>>
>>>> * What went wrong:
>>>> Execution failed for task ':geode-core:spotlessJavaCheck'.
>>>>> Format violations were found. Run 'gradlew spotlessApply' to fix
>> them.
>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
>>>> ctionFactoryImpl.java
>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\
>>> GFConnectionImpl.java
>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>> LocalTransaction.java
>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>> ManagedConnection.java
>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>> ManagedConnectionFactory.java
>>>> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
>>>> ManagedConnectionnMetaData.java
>>>> etc.
>>>>
>>>> Until this is fixed I can't validate that the changes I check in
>> conform
>>>> to the formatting rules.
>>>>


Re: more spotless problems on Windows

Posted by Nabarun Nag <nn...@pivotal.io>.
I tested gradlew build on a windows 10 machine to test the spotless feature.

Steps:
1.  git clone https://git-wip-us.apache.org/repos/asf/incubator-geode.git
open
2. cd open
3. git checkout -b develop origin/develop
4.  ./gradlew clean build -Dskip.tests=true

The build failed with multiple formatting error on each file.

In my opinion the issue still exists. It will be awesome if someone else
can verify if the issue still exists by running the build steps on a
different windows machine.

Regards
Nabarun

On Mon, Oct 24, 2016 at 3:50 PM Bruce Schuchardt <bs...@pivotal.io>
wrote:

> The lineEndings setting works great.  I've pushed the change to develop
>
> On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io> wrote:
>
> > I think we have a fix for the spotless line ending issue on windows;
> Bruce
> > will check it in shortly:
> >
> > diff --git a/build.gradle b/build.gradle
> > index a734e05..6e82433 100755
> > --- a/build.gradle
> > +++ b/build.gradle
> > @@ -88,6 +88,7 @@ subprojects {
> >
> >    apply plugin: "com.diffplug.gradle.spotless"
> >    spotless {
> > +    lineEndings = 'unix';
> >      java {
> >        eclipseFormatFile
> > "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
> >
> >
> > On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <
> bschuchardt@pivotal.io>
> > wrote:
> >
> > > Running geode-core:spotlessCheck complains that all of the .java files
> > > have format violations
> > >
> > > * What went wrong:
> > > Execution failed for task ':geode-core:spotlessJavaCheck'.
> > > > Format violations were found. Run 'gradlew spotlessApply' to fix
> them.
> > > geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
> > > ctionFactoryImpl.java
> > > geode-core\src\jca\java\org\apache\geode\internal\ra\
> > GFConnectionImpl.java
> > > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > > LocalTransaction.java
> > > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > > ManagedConnection.java
> > > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > > ManagedConnectionFactory.java
> > > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > > ManagedConnectionnMetaData.java
> > > etc.
> > >
> > > Until this is fixed I can't validate that the changes I check in
> conform
> > > to the formatting rules.
> > >
> >
>

Re: more spotless problems on Windows

Posted by Bruce Schuchardt <bs...@pivotal.io>.
The lineEndings setting works great.  I've pushed the change to develop

On Mon, Oct 24, 2016 at 3:47 PM, Dan Smith <ds...@pivotal.io> wrote:

> I think we have a fix for the spotless line ending issue on windows; Bruce
> will check it in shortly:
>
> diff --git a/build.gradle b/build.gradle
> index a734e05..6e82433 100755
> --- a/build.gradle
> +++ b/build.gradle
> @@ -88,6 +88,7 @@ subprojects {
>
>    apply plugin: "com.diffplug.gradle.spotless"
>    spotless {
> +    lineEndings = 'unix';
>      java {
>        eclipseFormatFile
> "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
>
>
> On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <bs...@pivotal.io>
> wrote:
>
> > Running geode-core:spotlessCheck complains that all of the .java files
> > have format violations
> >
> > * What went wrong:
> > Execution failed for task ':geode-core:spotlessJavaCheck'.
> > > Format violations were found. Run 'gradlew spotlessApply' to fix them.
> > geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
> > ctionFactoryImpl.java
> > geode-core\src\jca\java\org\apache\geode\internal\ra\
> GFConnectionImpl.java
> > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > LocalTransaction.java
> > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > ManagedConnection.java
> > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > ManagedConnectionFactory.java
> > geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> > ManagedConnectionnMetaData.java
> > etc.
> >
> > Until this is fixed I can't validate that the changes I check in conform
> > to the formatting rules.
> >
>

Re: more spotless problems on Windows

Posted by Dan Smith <ds...@pivotal.io>.
I think we have a fix for the spotless line ending issue on windows; Bruce
will check it in shortly:

diff --git a/build.gradle b/build.gradle
index a734e05..6e82433 100755
--- a/build.gradle
+++ b/build.gradle
@@ -88,6 +88,7 @@ subprojects {

   apply plugin: "com.diffplug.gradle.spotless"
   spotless {
+    lineEndings = 'unix';
     java {
       eclipseFormatFile
"${rootProject.projectDir}/etc/eclipse-java-google-style.xml"


On Mon, Oct 24, 2016 at 2:50 PM, Bruce Schuchardt <bs...@pivotal.io>
wrote:

> Running geode-core:spotlessCheck complains that all of the .java files
> have format violations
>
> * What went wrong:
> Execution failed for task ':geode-core:spotlessJavaCheck'.
> > Format violations were found. Run 'gradlew spotlessApply' to fix them.
> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConne
> ctionFactoryImpl.java
> geode-core\src\jca\java\org\apache\geode\internal\ra\GFConnectionImpl.java
> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> LocalTransaction.java
> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> ManagedConnection.java
> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> ManagedConnectionFactory.java
> geode-core\src\jca\java\org\apache\geode\internal\ra\spi\JCA
> ManagedConnectionnMetaData.java
> etc.
>
> Until this is fixed I can't validate that the changes I check in conform
> to the formatting rules.
>