[JIRA] (JENKINS-43006) Round trip should add/retain file header including groovy she-bang ("#!groovy")

2 views
Skip to first unread message

jdumay@cloudbees.com (JIRA)

unread,
Mar 21, 2017, 6:46:03 PM3/21/17
to jenkinsc...@googlegroups.com
James Dumay updated an issue
 
Jenkins / Improvement JENKINS-43006
Round trip should add/retain file header including groovy she-bang ("#!groovy")

Liam Newman remember in the eyes of users a Declarative Jenkinsfile is not a "script" and a shebang would be drawing attention to its groovy origins (we've spent a lot of time removing the stink of groovy from declarative).

If you've added a shebang, I can see how we might want to preserve that for you. Ill let Andrew Bayer make that call (the roundtrip is actually controlled by declarative itself - not the editor).

Change By: James Dumay
Summary: BlueOcean Editor: Add Round trip should add /retain file header including groovy she-bang  ("#!groovy")
Component/s: pipeline-model-definition-plugin
Component/s: blueocean-pipeline-editor-plugin
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

jdumay@cloudbees.com (JIRA)

unread,
Mar 21, 2017, 6:46:04 PM3/21/17
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Mar 21, 2017, 7:08:02 PM3/21/17
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Improvement JENKINS-43006
 
Re: Round trip should add/retain file header including groovy she-bang ("#!groovy")

So we could always output a shebang at the top of the Jenkinsfile, but we can't only do it if there already was one - as with JENKINS-43005, that would need information that just isn't available to us in the parser.

bitwiseman@gmail.com (JIRA)

unread,
Mar 21, 2017, 9:57:01 PM3/21/17
to jenkinsc...@googlegroups.com

Andrew Bayer
This also means that any Jenkinsfile (like the ones we use in test) that has license header would have it stripped. That's no good.

jdumay@cloudbees.com (JIRA)

unread,
Mar 21, 2017, 10:10:01 PM3/21/17
to jenkinsc...@googlegroups.com

I just know Andrew Bayer its going to write the worlds second groovy compliant AST parser any day now....

But seriously, a big she-bang is going to hint at people that this is actually groovy under the hood and its taken a lot of work to wash that stank off.

jdumay@cloudbees.com (JIRA)

unread,
Mar 21, 2017, 10:13:01 PM3/21/17
to jenkinsc...@googlegroups.com
James Dumay edited a comment on Improvement JENKINS-43006
I just know [~abayer] its going to write the worlds second groovy compliant AST parser any day now.... ;)


But seriously, a big she-bang is going to hint at people that this is actually groovy under the hood and its taken a lot of work to wash that stank off.


Andrew, maybe it would be good to have another ticket describing the need for "preservation of comments" that has a good description on why this is hard and not feasible to do in the short term. Whenever the shebang or comment preservation comes up, you can close it as a duplicate of that ticket. I've done this for JENKINS-38442 and its a proven way of keeping the noise of endless explanations down and lays out quite clearly that people shouldn't hold their breath for this functionality.

andrew.bayer@gmail.com (JIRA)

unread,
Mar 21, 2017, 10:16:01 PM3/21/17
to jenkinsc...@googlegroups.com

James Dumay - such a ticket exists - JENKINS-38864. =) Liam Newman - Yeah, losing the license headers is a shame, but again...limitations of the tooling we have available to work with, and questions of how much value we'd actually get from the amount of research and work needed to be able to deliver.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:42 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Won't Fix
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages