Book a Demo

Author Topic: VS2005 MDG link and Comment problems  (Read 2671 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
VS2005 MDG link and Comment problems
« on: August 16, 2006, 10:07:04 pm »
Hi,

I thought I'd found a bug with C# VS2005 MDG Add-in round tripping, but I haven't been able to reproduce it and the evidence got overwritten.

I was stress testing the mechanism as I want to use it in my next assignment and I was probably doing things I shouldn't, but the outcome was worrying enough to cause me to post this, just to see if anyone's seen anything like it.

It appeared that trailing comments on attributes on regeneration were created as /// <summary> comments on the attribute following!  I checked the EA model and they had been assigned to the wrong attribute.

In another piece of code, I had a commented out code line (attribute declaration) with a trailing comment.  The regenerated code removed the leading comment - thus enabling the line of code!

Now, I stress that I tried to reproduce the problem (by rolling back and moving forward again) and so far everything has worked out OK...

Has anyone seen anything like this?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: VS2005 MDG link and Comment problems
« Reply #1 on: August 16, 2006, 11:20:58 pm »
Yep - same thing happens in 789 wowo MDG, particularly with trailing comments on a procedure
eg

Code: [Select]

...blahblah...

public bool AlwaysTrue() {
   return true;
}


// MNT: BB 26JUL06 Following cr@p removed
//    private bool NotAlwaysTrue() {
//        return not(true);
//    }

///<summary>
/// This is a very important and publically visible routine.
///</summary>
public MyVeryImportantRoutine {
...

...




Guess how that reveng's!

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: VS2005 MDG link and Comment problems
« Reply #2 on: August 17, 2006, 03:13:21 pm »
Sorry Bruce you've got me stumped.

Even in 789 if I add that into a C# class (and fix the syntax of MyVeryImportantRoutine so that it reverse engineers) I get two methods and MyVeryImportantRoutine has the note 'This is a very important and publically visible routine.'  AlwaysTrue doesn't have a comment.  What did you get?

Regarding the original post, it is possible for comments to be assigned to the wrong attribute.  But was it obviously the wrong attribute, or was it something only a human could pick up?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: VS2005 MDG link and Comment problems
« Reply #3 on: August 17, 2006, 09:16:02 pm »
Quote
Regarding the original post, it is possible for comments to be assigned to the wrong attribute.  But was it obviously the wrong attribute, or was it something only a human could pick up?
Simon,

Since I don't have the evidence any more, I can't be sure... But from what I recall, it places the trailing comment (on the same line as the attribute - actually it was an enumeration literal) against the attribute following.  It seemed pretty clear it should have been assigned to the first attribute.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: VS2005 MDG link and Comment problems
« Reply #4 on: August 17, 2006, 11:02:09 pm »
Thanks Paolo.

From memory we added support for that situation around version 5.0.  My test just then worked okay, so there was probably more to it than that.