Wiki

Ticket #295 (closed defect: fixed)

Opened 5 years ago

Last modified 5 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:

Description

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

 http://cobra-language.com/forums/viewtopic.php?f=4&t=1007#p5150

reported-by:nerdzero

Attachments

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

Change History

Changed 5 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 5 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 5 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 http://cobra-language.com/trac/cobra/browser/cobra/trunk/Source/InstallFromWorkspace.cobra#L111.

Changed 5 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 5 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 5 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
#!/bin/bash
cd "`dirname "$0"`" ; cd ..
./bin/build -t:lib -namespace:Cobra.Compiler -out:Cobra.Compiler.dll "$@"
ls -lF Cobra.Compiler.*

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

Changed 5 years ago by hopscc

Changed 5 years ago by hopscc

Something like this patch then ?

Changed 5 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 5 years ago by Charles

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