[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread jdu...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 James Dumay updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-38864  
 
 
  Add support for comments to the ModelAST   
 

  
 
 
 
 

 
Change By: 
 James Dumay  
 

  
 
 
 
 

 
 {panel:title=Support for comment preservation is not actively being worked on|titleBGColor=lightgrey}Many users have asked for preservation of comments, formatting and "shebang"s when loading and saving a Jenkinsfile through the editor. Due to technical constraints, this is infeasible to do in the short term without a high level of engineering time.{panel}*Problem* Would be nice to have support for comments in the {{ModelAST}}. TBD whether the comments are required to be fully round-trip aware, but for anyone using the {{ModelAST}} classes to generate a groovy pipeline definition the ability to inject comments into the generated groovy would be incredibly useful.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and 

[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Uggh. Well, it's still the case that it's not going to happen at any time in the foreseeable future and most likely will never happen. I mean, I sure don't have time to do it. =)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread bitwise...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liam Newman commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Michael Neale  I would say it is a bit more complex than that. :smile: Andrew Bayer And saying we'd have to implement our own parser, overlooks the idea that this functionality could be added to Groovy itself or that the work might have already been done by someone else. Not to say it has any application here, but it looks like eclipse did exactly that. They have an AST model that includes a Comment class.  There's also some thing called 'Parrot' - https://github.com/danielsun1106/groovy-parser.  And there's at least one longer term exploration task in Groovy - https://issues.apache.org/jira/browse/GROOVY-4003.  There's probably more.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Liam Newman For the same reason we can't round-trip comments, we can't error/warning on comments either - from the Declarative parser's perspective, there never are any comments.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread mne...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Neale commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Yes, this is one of the price paid for groovy as pipeline config language.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread bitwise...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liam Newman commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Andrew Bayer If using the editor is going to strip comments, perhaps we should warn on finding any comments in Declarative Pipeline. They're effectively in the same boat as code outside the pipeline section - unsupported.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 I guess so, but this is as close to "Never going to happen" as it can get without being 100% guaranteed to never happen. We'd literally have to write our own parser to do this and still use the Groovy compiler/parser to do validation. It would be a Bad Idea.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-03-21 Thread bitwise...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liam Newman commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Andrew Bayer  Is it okay if we reopen this? I understand if it is not feasible in the short (or even medium) term. However, since this results in loosing existing comments from a Jenkins file anytime someone uses the Blue Ocean editor on a file, it's going to be pretty annoying. I think we're going to get complaints.  Saying "Won't fix" means "Never going to happen" as opposed to "We don't see how to do this now, but are open to doing revisiting".   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2017-02-27 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer resolved as Won't Fix  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-38864  
 
 
  Add support for comments to the ModelAST   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 Open Resolved  
 
 
Resolution: 
 Won't Fix  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2016-10-11 Thread mne...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Neale commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Andrew Bayer ok - then by that rule - no comments. They can use echo to put comments!  And I like your thinking, this is how we have to work to make this right.  However, what about stuff outside of "pipeline" block - presumably comments allowed, but round tripping doesn't cover that right?   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2016-10-11 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Oh, and if it can't be round-tripped, then it isn't happening in general. I'm sticking hard to the requirement that everything be round-trippable.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2016-10-11 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 Soo this isn't actually possible. By that, I mean comments aren't part of the Groovy AST - they're already discarded by the time we get to the compilation phase where we're translating the Groovy AST into the declarative ModelAST. I suppose that theoretically we could re-parse the original source and look for comments ourselves and somehow associate them with the ModelAST elements nearest them...but no. Not gonna happen. So this, sadly, is a won't-do.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2016-10-11 Thread mne...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Neale commented on  JENKINS-38864  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Add support for comments to the ModelAST   
 

  
 
 
 
 

 
 right Patrick Wolf James Dumay - this may be important. May be. If we are round tripping Jenkinsfiles via the editor, MUST we war-and-peace that people may have written in comments?   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38864) Add support for comments to the ModelAST

2016-10-10 Thread stephenconno...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 stephenconnolly created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-38864  
 
 
  Add support for comments to the ModelAST   
 

  
 
 
 
 

 
Issue Type: 
  Improvement  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 pipeline-model-definition-plugin  
 
 
Created: 
 2016/Oct/10 1:32 PM  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 stephenconnolly  
 

  
 
 
 
 

 
 Would be nice to have support for comments in the ModelAST. TBD whether the comments are required to be fully round-trip aware, but for anyone using the ModelAST classes to generate a groovy pipeline definition the ability to inject comments into the generated groovy would be incredibly useful.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment