Ticket #295 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Installer: Cobra.Compiler.dll gets version number 0.0

Reported by: Charles Owned by: Charles
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:


Should be 0.9 (or whatever the current version is).



embed-ver.patch Download (6.8 KB) - added by hopscc 6 years ago.

Change History

Changed 6 years ago by hopscc

AssemblyVersion set from regex parse of .versionString
wired into options['extra-source'] in CommandLine.cobra doBuildStandardLibrary.
Shows in built cobra.core.dll ( explorer: properties -> details)

Does gacutil need to specify the fully qualified name ( incl version) for that to be recorded??

Changed 6 years ago by Charles

I don't think so. I think the gacutil pulls it out of the assembly. I don't recall ever passing a version number to the gacutil for any situation including 3rd party DLLs on .NET projects

Changed 6 years ago by nerdzero

No, gacutil doesn't need the version number. doBuildStandardLibrary creates Cobra.Core.dll though. Not Cobra.Compiler.dll. Checkout the var libs in

Changed 6 years ago by hopscc

My mistake - I was looking at Cobra.Core.dll which has the attribute for version
number inserted into it into it programmatically.
Thats not happening for a library build of the same files (Cobra.Compiler.dll) if not built -bsl...
- that build probably needs a generated additional file holding the desired version values (vesioning attributes)

Changed 6 years ago by nerdzero

Do you guys think this would be easier, or at least cleaner, if there was a separate command line option for -build-compiler-lib?

Changed 6 years ago by Charles

  • owner set to Charles
  • status changed from new to assigned

.doBuildStandardLibrary has code for extracting a suitable assembly version number from the Cobra version number, and then augmenting the Cobra source with an AssemblyVersion? attribute to contain it.

My current thinking is to break out that functionality.

So we would add a new command line option called -embed-version[:value]. This option would augment the Cobra source with an AssemblyVersion? attribute of the given value. If the value wasn't passed, it would be derived from the Cobra version.

Then we would have something usable independent of whether we happen to be building the std lib, the compiler lib or anything else.

Regarding adding a -build-compiler-lib, I'm happy enough with the current scripts, especially after making the above enhancement. The scripts are (on the bash side):

$ cat bin/build-compiler-lib
cd "`dirname "$0"`" ; cd ..
./bin/build -t:lib -namespace:Cobra.Compiler -out:Cobra.Compiler.dll "$@"
ls -lF Cobra.Compiler.*

$ cat bin/build
cd "`dirname "$0"`" ; cd ..
mono Snapshot/cobra.exe -compile -color -debug -ert:yes -timeit "$@" cobra.cobra -files:files-to-compile.text

Changed 6 years ago by hopscc

Changed 6 years ago by hopscc

Something like this patch then ?

Changed 6 years ago by Charles

Looks good. Patch applied in changeset:2953

This ticket can't really be closed until the next snapshot and subsequent update to the build-compiler-lib script. So I'm leaving the ticket open.

Changed 6 years ago by Charles

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