Wiki

Ticket #3 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

Embed run-time option doesn't prevent namespace collisions

Reported by: Chuck.Esterbrook Owned by:
Priority: major Milestone:
Component: Cobra Compiler Version: 0.7.4
Keywords: Cc:

Description

Using the -embed-run-time:yes (or -ert:yes) option on the command line with DLLs leads to problems later when 2 or more DLLs are referenced in the same application. They will collide on the namespace "Cobra.Lang."

This is especially problematic because -ert:yes is the default behavior.

Change History

Changed 10 years ago by Chuck

The likely solution is to mangle the name of the "Cobra.Lang" namespace into something private. This could be the appending of the MD5 hash of the current date/time and current directory.

The CobraLang.cobra and CobraLang.cs files would likely need to be copied with the name mangling done to the copies.

Changed 9 years ago by Chuck

The run-time library is now divided into several files located in the Cobra.Lang subdirectory. Copying files just to change the namespace seems rather inefficient. Another approach would be to provide an internal "namespace name replace" feature in the compiler.

Changed 9 years ago by Chuck

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.