[Mono-bugs] [Bug 33892][Wis] New - Add module support to mcs

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
13 Nov 2002 16:26:28 -0000


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by danmorg@sc.rr.com.

http://bugzilla.ximian.com/show_bug.cgi?id=33892

--- shadow/33892	Wed Nov 13 11:26:28 2002
+++ shadow/33892.tmp.26199	Wed Nov 13 11:26:28 2002
@@ -0,0 +1,56 @@
+Bug#: 33892
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: danmorg@sc.rr.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Add module support to mcs
+
+Assemblies can consist of one or more files.  By default they're only
+one file (a .dll or .exe), but they can consist of additional files
+(image files, glade xml files, and, here's the important part,
+additional CIL code).
+
+A module *is not* an assembly, but it can be part of one, allowing you
+to have multi-file assemblies.  See:
+
+http://msdn.microsoft.com/library/default.asp?url=/library/en-
+us/cpguide/html/cpconbuildingmulti-fileassembly.asp
+
+This allows you to do:
+
+	# create shared.netmodule
+	csc /t:module shared.cs
+
+	# create app.exe which uses b.netmodule
+	csc /t:exe /addmodule:shared.netmodule app.cs
+
+	# other apps can also use the same .netmodule
+	csc /t:exe /addmodule:shared.netmodule another-app.cs
+
+You still have multiple files, *but* since the Assembly (and not an
+arbitrary file) is the unit of type scoping, this allows the contents of
+`shared.netmodule' to be all be marked as `internal', yet `app.cs' can
+still use those types.
+
+This allows you to share internal code between assemblies without making
+it public.
+
+For more information, see ECMA Standard 335, Partition 2, Section 6.
+
+As for mcs, I can see this as being very useful.  Multi-file assemblies
+are allowed, mono runs them, but mcs can't create them.  At least, the
+build I have -- almost a month old -- can't create .netmodule files.  If
+you specify `/t:module' to csc, it creates a .dll with a .assembly
+directive, which a .netmodule file lacks.  The .assembly directive is
+what marks a file as an assembly.