Project

General

Profile

Bug #3711

improve/fix comments conversion problems

Added by Greg Shah almost 8 years ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

Related issues

Related to Conversion Tools - Feature #2110: improve orphan comment processing Closed
Related to FWD - Bug #3320: Problems with comments New 08/11/2017
Related to Conversion Tools - Bug #2113: convert/comments.rules should ignore artificial nodes when trying to match comments to code New
Related to Conversion Tools - Feature #2111: improve handling of comments that are related to each other ("sets" of comments) New
Related to Bugs - Bug #1454: progress lexer fails to parse comments without space before New 07/20/2012

History

#1 Updated by Greg Shah almost 8 years ago

  • Related to Feature #2110: improve orphan comment processing added

#2 Updated by Greg Shah almost 8 years ago

With 2110a, the number of orphaned comments is now a small fraction of the previous amount. For example, the large ChUI application had over 26000 orphaned comments before 2110a and after it had 289.

The remaining orphaned comments are probably related to cases where the conversion deletes nodes such that the shadow node's left id/right id reference nodes that no longer exist.

An example can be seen in testcases/uast/strings_comments_whitespace.p.

The code is similar to this:

my-char-var = 'The beginning ' + /* comment1 */
              'of some ' + /* comment2 */
              'text.'.

The conversion will rewrite the rvalue expression as a simple STRING with text "The beginning of some text.". Thus, the original STRING and PLUS nodes no longer exist and the comments are orphaned.

A solution to this would require fixups for the shadow nodes when referenced AST nodes are deleted. There may be other cases too.

#3 Updated by Greg Shah 5 months ago

  • Subject changed from resolve remaining orphaned comments cases to improve/fix comments conversion problems

This task is about improving/fixing comments in general. There will generally be 2 causes:

  1. orphaned comments where we cannot calculate an attachment point for a given comment
  2. comments that are placed in the wrong location

Both sets of problems should be resolved here.

We should start by collecting testcases (both successful and failing). I will link related customer bug reports here. Those need to be "mined" for failing testcases.

#7 Updated by Greg Shah 5 months ago

  • Related to Bug #3320: Problems with comments added

#8 Updated by Greg Shah 5 months ago

  • Related to Bug #2113: convert/comments.rules should ignore artificial nodes when trying to match comments to code added

#9 Updated by Greg Shah 5 months ago

  • Related to Feature #2111: improve handling of comments that are related to each other ("sets" of comments) added

#10 Updated by Greg Shah 5 months ago

  • Related to Bug #1454: progress lexer fails to parse comments without space before added

Also available in: Atom PDF