Clean-up saproj XML

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Clean-up saproj XML

Postby Wernight » Thu Jun 28, 2012 12:19 pm

I found SmartAssembly doesn't have a complete documentation of the XML project files. More importantly when changing some settings and reverting that change, the XML changes. For example a:

Code: Select all
<Embedded />


becomes

Code: Select all
<Embedded Compress="1" GAC="0" />


Meaning the default values are added. This is a pretty big issue with source control systems. I'd suggest to always or never include the default values.

Also it seems that there is no way to clean-up assemblies that were referenced and are not more referenced (unless you manually edit the saproj file and check each one by one).
Wernight
 
Posts: 5
Joined: Thu Jun 28, 2012 12:15 pm

Postby Wernight » Thu Jun 28, 2012 12:58 pm

Ideally the SA project editor should have 3 states for such. One being the default, the rest being the defined value. This is only supposing that you wish to possibly change the default value later on. If the default value stay for backward compatibility then better never include the default value. This would be clear.

I forgot to specify that the hardest part in regards to source control systems, is that when merging or doing changes it's impossible to know if those values mean the same as not specifying any. This is because there is no reference XML documentation for it.
Wernight
 
Posts: 5
Joined: Thu Jun 28, 2012 12:15 pm

Postby james.billings » Fri Jun 29, 2012 1:17 pm

Thanks for your post- I'm guessing for the "affecting source control systems" problem this is perhaps something that wasn't considered for the initial design. Are you finding multiple users are changing the file and it's hard to re-merge or something? I'd like to understand the exact difficulty it's causing.

As for cleaning up assemblies, the GUI has a "rescan dependencies" option within the merging and embedding section that should correct any missing ones, you can then re-save the project.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby Wernight » Mon Jul 02, 2012 9:41 am

Rescan adds missing ones but doesn't to remove those that are not used anymore and that don't exist anymore.

Yes it affects greatly merges but also change tracking/code review. When you had something using default attributes values and then it gets changed to something with attributes explicitly defined, you don't know if those changes change anything and what they change.

Exanpe:

- <Foo />
+ <Foo Bar="1" />

Does it mean the "Bar" is now enabled and wasn't before? What affect does "Bar" mean anyway?
Wernight
 
Posts: 5
Joined: Thu Jun 28, 2012 12:15 pm

Postby james.billings » Thu Jul 05, 2012 1:52 pm

Thanks for the clarification.
I can certainly add a request that we amend the file to always explicitly define the attributes rather than defaulting to "something" when they are missing. I'm not sure when such a change would take place but it'll be on the radar at least.

Thanks!
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 1 guest