Re: [Mono-dev] Is there any reason to not add instead a flag?

2010-08-12 Thread Andrés G. Aragoneses

Ok fair enough, I'll implement your suggestions.

You know, it's not that I don't like to document stuff (I'm almost done
porting [1] to [2] so we can replace it in [3] ;) )

Regards,

Andrés

[1] http://www.mono-project.com/Compiling_Mono_From_SVN
[2] http://www.mono-project.com/Compiling_Mono_From_Git
[3] http://www.mono-project.com/Compiling
El 12/08/10 04:39, Miguel de Icaza escribió:
 Hello,
 
 I thought about this, but it would be a bit weird to use a tool called
 mono-api-info if you don't want the API but the ABI. This is why I
 thought it would be more intuitive this way.
 
 
 Minor issue.
 
  It goes against the If it is not documented, it does not exist rule.
 
 Then mono-api-info doesn't exist either :) (there's no man page for it)
 
 
 What we have here is an opportunity.
 
 You now get to write the man page and document what both do.
 
 I'm thinking I can get it to be the same executable, but can it be a
 different script called mono-abi-info which internally calls
 mono-api-info.exe passing the flag?
 
 
 I do not want that, it is a minor aesthetic issue.   Just change it to
 --abi and let us be done.
  
 
 If there's no man page for mono-api-info, I prefer to do it in a wiki
 page, ok? (Don't know man format enough to not copy-paste the
 structure ;) )
 
 
 I realize it is more convenient for you, but it is not more convenient
 for the user that has to wonder What the hell does this do?
 
 Granted, there is no man page, so this is why we are going to turn a
 negative into a positive.
 
 
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Is there any reason to not add instead a flag?

2010-08-12 Thread Miguel de Icaza
Hello,

I'm almost done
 porting [1] to [2] so we can replace it in [3] ;) )


This is music to my ears!


 [1] http://www.mono-project.com/Compiling_Mono_From_SVN
 [2] http://www.mono-project.com/Compiling_Mono_From_Git
 [3] http://www.mono-project.com/Compiling

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Is there any reason to not add instead a flag?

2010-08-11 Thread Andrés G. Aragoneses
Hey Miguel, sorry for the small delay to reply:

El 10/08/10 21:41, Miguel de Icaza escribió:
 In your recent commit, you added a new command to mcs/tools/corcompare,
 the mono-abi-info tool.   I do not know what this tool does, and I do
 not know why we could not just have used mono-api-info with a new flag
 --abi instead of installing another executable.

I thought about this, but it would be a bit weird to use a tool called
mono-api-info if you don't want the API but the ABI. This is why I
thought it would be more intuitive this way.

 It goes against the If it is not documented, it does not exist rule.

Then mono-api-info doesn't exist either :) (there's no man page for it)

 So can we:
 
   (a) get this merged into mono-api-info

I'm thinking I can get it to be the same executable, but can it be a
different script called mono-abi-info which internally calls
mono-api-info.exe passing the flag?

   (b) document this on the wiki or the relevant man pages?

If there's no man page for mono-api-info, I prefer to do it in a wiki
page, ok? (Don't know man format enough to not copy-paste the structure ;) )

I'll work on it tomorrow. Thanks for the feedback.

  Andres


 
 miguel
 
 Branch: refs/heads/master
   Home: http://github.com/mono/mono

 Commit: c508a786c106ceff274b9b985919368b6b404342
 Author: Andrés G. Aragoneses kno...@gmail.com
   Date: 08/10/2010 14:36:27
URL: 
 http://github.com/mono/mono/commit/c508a786c106ceff274b9b985919368b6b404342

 Added new ABI mode to mono-api-info tool, wrapped in a mono-abi-info script.

 2010-08-05  Andrés G. Aragoneses  and...@lindenlab.com

 * mcs/tools/corcompare/mono-api-info.cs: Implemented new mode to show ABI.
 * mcs/tools/corcompare/Makefile: added mono-abi-info autofoo.
 * scripts/.gitignore: added mono-abi-info.
 * scripts/Makefile.am: added mono-abi-info autofoo.

 Changed paths:
  M ChangeLog
  M mcs/tools/corcompare/ChangeLog
  M mcs/tools/corcompare/Makefile
  M mcs/tools/corcompare/mono-api-info.cs
  M scripts/.gitignore
  M scripts/Makefile.am

 Modified: ChangeLog
 ===
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,3 +1,8 @@
 +2010-08-05  Andr??s G. Aragoneses  and...@lindenlab.com
 +
 +* scripts/.gitignore: added mono-abi-info.
 +* scripts/Makefile.am: added mono-abi-info autofoo.
 +
  2010-07-16  Zoltan Varga  var...@gmail.com
  
  * configure.in: Remove the 'LLVM backend is experimental' warning.
 Modified: mcs/tools/corcompare/ChangeLog
 ===
 --- a/mcs/tools/corcompare/ChangeLog
 +++ b/mcs/tools/corcompare/ChangeLog
 @@ -1,3 +1,8 @@
 +2010-08-05  Andr??s G. Aragoneses  and...@lindenlab.com
 +
 +* mono-api-info.cs: Implemented new mode to show ABI.
 +* Makefile: added mono-abi-info autofoo.
 +
  2010-04-16  C.J. Adams-Collier  c...@colliertech.org
  
  * mono-api-diff.cs: revived from the mono-2-2 branch and applied
 Modified: mcs/tools/corcompare/Makefile
 ===
 --- a/mcs/tools/corcompare/Makefile
 +++ b/mcs/tools/corcompare/Makefile
 @@ -2,7 +2,7 @@ thisdir = tools/corcompare
  SUBDIRS =
  include ../../build/rules.make
  
 -ALL_PROGRAMS = mono-api-info.exe
 +ALL_PROGRAMS = mono-api-info.exe mono-abi-info.exe
  
  CECIL = ../../class/lib/net_2_0/Mono.Cecil.dll
  
 @@ -43,3 +43,6 @@ dist-local: dist-default
  
  mono-api-info.exe: $(APIINFO_SOURCES)
  $(CSCOMPILE) -r:$(CECIL) -out:$@ $^
 +
 +mono-abi-info.exe: $(APIINFO_SOURCES)
 +$(CSCOMPILE) -r:$(CECIL) -d:ABI -out:$@ $^
 Modified: mcs/tools/corcompare/mono-api-info.cs
 ===
 --- a/mcs/tools/corcompare/mono-api-info.cs
 +++ b/mcs/tools/corcompare/mono-api-info.cs
 @@ -29,6 +29,9 @@ namespace CorCompare
  if (args.Length == 0)
  return 1;
  
 +AbiMode = false;
 +SetAbiMode ();
 +
  AssemblyCollection acoll = new AssemblyCollection ();
  
  foreach (string fullName in args) {
 @@ -45,6 +48,14 @@ namespace CorCompare
  doc.WriteTo (writer);
  return 0;
  }
 +
 +[System.Diagnostics.Conditional (ABI)]
 +private static void SetAbiMode ()
 +{
 +AbiMode = true;
 +}
 +
 +internal static bool AbiMode { get; private set; }
  }
  
  public class Utils {
 @@ -211,7 +222,7 @@ namespace CorCompare
  if (string.IsNullOrEmpty (t.Namespace))
  continue;
  
 -if ((t.Attributes  
 TypeAttributes.VisibilityMask) != TypeAttributes.Public)
 +if (!Driver.AbiMode  ((t.Attributes  
 TypeAttributes.VisibilityMask) != TypeAttributes.Public))
   

Re: [Mono-dev] Is there any reason to not add instead a flag?

2010-08-11 Thread Miguel de Icaza
Hello,

I thought about this, but it would be a bit weird to use a tool called
 mono-api-info if you don't want the API but the ABI. This is why I
 thought it would be more intuitive this way.


Minor issue.

 It goes against the If it is not documented, it does not exist rule.

 Then mono-api-info doesn't exist either :) (there's no man page for it)


What we have here is an opportunity.

You now get to write the man page and document what both do.

I'm thinking I can get it to be the same executable, but can it be a
 different script called mono-abi-info which internally calls
 mono-api-info.exe passing the flag?


I do not want that, it is a minor aesthetic issue.   Just change it to --abi
and let us be done.


 If there's no man page for mono-api-info, I prefer to do it in a wiki
 page, ok? (Don't know man format enough to not copy-paste the structure ;)
 )


I realize it is more convenient for you, but it is not more convenient for
the user that has to wonder What the hell does this do?

Granted, there is no man page, so this is why we are going to turn a
negative into a positive.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Is there any reason to not add instead a flag?

2010-08-10 Thread Miguel de Icaza
In your recent commit, you added a new command to mcs/tools/corcompare,
the mono-abi-info tool.   I do not know what this tool does, and I do
not know why we could not just have used mono-api-info with a new flag
--abi instead of installing another executable.

It goes against the If it is not documented, it does not exist rule.

So can we:

(a) get this merged into mono-api-info
(b) document this on the wiki or the relevant man pages?

miguel

 Branch: refs/heads/master
   Home: http://github.com/mono/mono
 
 Commit: c508a786c106ceff274b9b985919368b6b404342
 Author: Andrés G. Aragoneses kno...@gmail.com
   Date: 08/10/2010 14:36:27
URL: 
 http://github.com/mono/mono/commit/c508a786c106ceff274b9b985919368b6b404342
 
 Added new ABI mode to mono-api-info tool, wrapped in a mono-abi-info script.
 
 2010-08-05  Andrés G. Aragoneses  and...@lindenlab.com
 
 * mcs/tools/corcompare/mono-api-info.cs: Implemented new mode to show ABI.
 * mcs/tools/corcompare/Makefile: added mono-abi-info autofoo.
 * scripts/.gitignore: added mono-abi-info.
 * scripts/Makefile.am: added mono-abi-info autofoo.
 
 Changed paths:
  M ChangeLog
  M mcs/tools/corcompare/ChangeLog
  M mcs/tools/corcompare/Makefile
  M mcs/tools/corcompare/mono-api-info.cs
  M scripts/.gitignore
  M scripts/Makefile.am
 
 Modified: ChangeLog
 ===
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,3 +1,8 @@
 +2010-08-05  Andr??s G. Aragoneses  and...@lindenlab.com
 +
 + * scripts/.gitignore: added mono-abi-info.
 + * scripts/Makefile.am: added mono-abi-info autofoo.
 +
  2010-07-16  Zoltan Varga  var...@gmail.com
  
   * configure.in: Remove the 'LLVM backend is experimental' warning.
 Modified: mcs/tools/corcompare/ChangeLog
 ===
 --- a/mcs/tools/corcompare/ChangeLog
 +++ b/mcs/tools/corcompare/ChangeLog
 @@ -1,3 +1,8 @@
 +2010-08-05  Andr??s G. Aragoneses  and...@lindenlab.com
 +
 + * mono-api-info.cs: Implemented new mode to show ABI.
 + * Makefile: added mono-abi-info autofoo.
 +
  2010-04-16  C.J. Adams-Collier   c...@colliertech.org
  
   * mono-api-diff.cs: revived from the mono-2-2 branch and applied
 Modified: mcs/tools/corcompare/Makefile
 ===
 --- a/mcs/tools/corcompare/Makefile
 +++ b/mcs/tools/corcompare/Makefile
 @@ -2,7 +2,7 @@ thisdir = tools/corcompare
  SUBDIRS =
  include ../../build/rules.make
  
 -ALL_PROGRAMS = mono-api-info.exe
 +ALL_PROGRAMS = mono-api-info.exe mono-abi-info.exe
  
  CECIL = ../../class/lib/net_2_0/Mono.Cecil.dll
  
 @@ -43,3 +43,6 @@ dist-local: dist-default
  
  mono-api-info.exe: $(APIINFO_SOURCES)
   $(CSCOMPILE) -r:$(CECIL) -out:$@ $^
 +
 +mono-abi-info.exe: $(APIINFO_SOURCES)
 + $(CSCOMPILE) -r:$(CECIL) -d:ABI -out:$@ $^
 Modified: mcs/tools/corcompare/mono-api-info.cs
 ===
 --- a/mcs/tools/corcompare/mono-api-info.cs
 +++ b/mcs/tools/corcompare/mono-api-info.cs
 @@ -29,6 +29,9 @@ namespace CorCompare
   if (args.Length == 0)
   return 1;
  
 + AbiMode = false;
 + SetAbiMode ();
 +
   AssemblyCollection acoll = new AssemblyCollection ();
  
   foreach (string fullName in args) {
 @@ -45,6 +48,14 @@ namespace CorCompare
   doc.WriteTo (writer);
   return 0;
   }
 +
 + [System.Diagnostics.Conditional (ABI)]
 + private static void SetAbiMode ()
 + {
 + AbiMode = true;
 + }
 +
 + internal static bool AbiMode { get; private set; }
   }
  
   public class Utils {
 @@ -211,7 +222,7 @@ namespace CorCompare
   if (string.IsNullOrEmpty (t.Namespace))
   continue;
  
 - if ((t.Attributes  
 TypeAttributes.VisibilityMask) != TypeAttributes.Public)
 + if (!Driver.AbiMode  ((t.Attributes  
 TypeAttributes.VisibilityMask) != TypeAttributes.Public))
   continue;
  
   if (t.DeclaringType != null)
 @@ -409,28 +420,31 @@ namespace CorCompare
   AddAttribute (nclass, enumtype, 
 Utils.CleanupTypeName (value_type.FieldType));
   }
  
 - MethodDefinition [] ctors = GetConstructors (type);
 - if (ctors.Length  0) {
 - Array.Sort (ctors, 
 MemberReferenceComparer.Default);
 - members.Add (new ConstructorData (document, 
 nclass, ctors));
 - }
 + if (!Driver.AbiMode) {
  
 -