Hi,

Given a package X, let us assume it's a library such that X = unit-
threaded, we find that in the ~/.dub/packages directory there is:

.dub/packages/unit-threaded-0.7.51/unit-threaded/gen_ut_main*
.dub/packages/unit-threaded-0.7.51/unit-threaded/libunit-threaded.a

These are the compilation products from the last undertaken compilation
and therefore more or less totally useless for anyone using more than
one D compiler.
Fortunately we find that there is a .dub directory with:

unit-threaded-0.7.51/unit-threaded/.dub
├── build
│   ├── 
gen_ut_main-debug-linux.posix-x86_64-dmd_2081-5610CAAD59972DC7A3346FE37EEC66C8
│   │   ├── gen_ut_main
│   │   └── gen_ut_main.o
│   ├── 
gen_ut_main-debug-linux.posix-x86_64-ldc_2081-02C0EA3AA341F3D071FE5E15E09EC021
│   │   └── gen_ut_main
│   ├── 
gen_ut_main-release-linux.posix-x86_64-dmd_2081-A8C2C7980309FFAFE08C15D3B29DE3CC
│   │   ├── gen_ut_main
│   │   └── gen_ut_main.o
│   ├── 
gen_ut_main-release-linux.posix-x86_64-ldc_2081-78BBAEC37FCFC878CC8215379A7D854B
│   │   └── gen_ut_main
│   ├── 
library-debug-linux.posix-x86_64-dmd_2081-5610CAAD59972DC7A3346FE37EEC66C8
│   │   └── libunit-threaded.a
│   ├── 
library-debug-linux.posix-x86_64-ldc_2081-02C0EA3AA341F3D071FE5E15E09EC021
│   │   └── libunit-threaded.a
│   ├── 
library-release-linux.posix-x86_64-dmd_2081-A8C2C7980309FFAFE08C15D3B29DE3CC
│   │   └── libunit-threaded.a
│   └── 
library-release-linux.posix-x86_64-ldc_2081-78BBAEC37FCFC878CC8215379A7D854B
│       └── libunit-threaded.a
└── dub.json

OK, so this is now actually useful stuff for people using Dub.

Clearly the directory names are dash separated components:

· configuration
· build type
· dot separated platform specification
· architecture
· underscore separated compiler name and major/minor version number
· some bizarre psuedo-random number

So the questions are:

1. How does Dub find the compiler version number, in this case 2.081,
given that neither DMD or LDC seem to have a way of delivering only the
version number.

2. What is the pseudo-random number, and how is it calculated?
 
-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to