[
https://issues.apache.org/jira/browse/JOHNZON-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16936531#comment-16936531
]
Romain Manni-Bucau commented on JOHNZON-272:
--------------------------------------------
[~mkarg] "outcome on Linux simply _must_ be different than on Windows" this is
a wrong assumption, the plugin expects the output to be the same whatever OS it
runs on. Also note that a lot of linter validates there is not \r in EOL -
whatever OS it runs on. To be very concrete, your PR breaks all the builds I'm
using this plugin for windows dev ;). This is why I ended up proposing a config
for that, values can be "OS,LF,CRLF". But breaking the deterministic output by
default is very wrong compared to the original design.
Regarding 2, the overall point is that you can assume that pushed code works
but it is pushed in a way it works, so if you change that when you clone, then
you break the hypothesis and therefore a failure is "fine" since you changed
the inputs. If I caricature to try to make it more obvious: if I write a test
doing assert 1+1 == 2 and you clone it and modify it to do assert 1+1 == 3 then
the issue is not in the project but in your clone. When it comes to generation,
EOL are part of the assumptions (at least for that plugin it is) but it is a
bug in the clone process, not in the sources.
While it touches only test code, it is not very important but production (main)
code should really not be OS dependent please.
> Fails to build Johnzon :: Maven Plugin
> --------------------------------------
>
> Key: JOHNZON-272
> URL: https://issues.apache.org/jira/browse/JOHNZON-272
> Project: Johnzon
> Issue Type: Bug
> Affects Versions: 1.2.0
> Environment: {{$ mvn -version}}
> {{Apache Maven 3.6.1 }}(d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555;
> 2019-04-04T21:00:29+02:00)
> {{Maven home: C:\Program Files\apache-maven-3.6.1}}
> {{Java version: 1.8.0_181, vendor: Azul Systems, Inc., runtime: C:\Program
> Files\zulu8.31.0.1-jdk8.0.181-win_x64\jre}}
> {{Default locale: de_DE, platform encoding: Cp1252}}
> {{OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"}}
> Reporter: Markus Karg
> Priority: Blocker
> Fix For: 1.2.1
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> {{$ git clone https://github.com/apache/johnzon.git}}
> {{$ cd johnzon}}
>
> {{$mvn clean install}}
> {{...}}
> {{[INFO] Running org.apache.johnzon.maven.plugin.ExampleToModelMojoTest}}
> {{[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> 0.172 s <<< FAILURE! - in
> org.apache.johnzon.maven.plugin.ExampleToModelMojoTest}}
> {{[ERROR] generate(org.apache.johnzon.maven.plugin.ExampleToModelMojoTest)
> Time elapsed: 0.125 s <<< FAILURE!}}
> {{org.junit.ComparisonFailure:}}
> {{expected:</*[}}
> {{ * Licensed to the Apache Software Foundation (ASF) under one}}
> {{...}}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)