www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dub seems to have forgotten my versions

reply jmh530 <john.michael.hall gmail.com> writes:
I am behind a corporate firewall at work so I have to manually 
install dub packages. This requires setting the version manually, 
otherwise master is inferred. This was working great until I had 
ended a dub run command early. Now dub seems to have forgotten 
that the versions are in there. It's weird because dub list has 
them.



C:\ProgrammingFiles\DFiles\testing\testing_mir_glas>dub list
Packages present in the system and known to dub:
   nlopt 0.1.0: C:\ProgrammingFiles\DFiles\nlopt\
   mir-algorithm 0.6.6: 
C:\ProgrammingFiles\DFiles\dubFolder\mir-algorithm-0.6.6\

   lubeck 0.0.3: C:\ProgrammingFiles\DFiles\dubFolder\lubeck-0.0.3\
   [snip]

and the local-packages.json has entries like

	{
		"name": "nlopt",
		"version": "0.1.0",
		"path": "C:\\ProgrammingFiles\\DFiles\\nlopt\\"
	},

but trying to build it cannot determine the version and assumes 
master (below). My sense is that I need to remove dub and 
local.packages.json and re-install everything. This process would 
be faster if dub weren't spending all this time trying and 
failing to download files. I wish I could tell it not to bother 
going online.

C:\ProgrammingFiles\DFiles\testing\testing_mir_glas>dub build 
--compiler=ldmd2 -
-verbose
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at 
C:\ProgramData\dub\packages\local-packages.json

Looking for local package map at 
C:\Users\[user]\AppData\Roaming\dub\packages\l
ocal-packages.json
Try to load local package map at 
C:\Users\[user]\AppData\Roaming\dub\packages\l
ocal-packages.json
Note: Failed to determine version of package mir-algorithm at .. 
Assuming ~maste
r.
Note: Failed to determine version of package lubeck at .. 
Assuming ~master.
Note: Failed to determine version of package mir-cpuid at .. 
Assuming ~master.
Note: Failed to determine version of package mir-glas at .. 
Assuming ~master.
Note: Failed to determine version of package mir-lapack at .. 
Assuming ~master.
Note: Failed to determine version of package mir-random at .. 
Assuming ~master.
Note: Failed to determine version of package scid at .. Assuming 
~master.
Note: Failed to determine version of package cblas at .. Assuming 
~master.
Note: Failed to determine version of package lapack at .. 
Assuming ~master.
Note: Failed to determine version of package numir at .. Assuming 
~master.
Note: Failed to determine version of package drepl at .. Assuming 
~master.
Note: Failed to determine version of package colorize at .. 
Assuming ~master.
Note: Failed to determine version of package libdparse at .. 
Assuming ~master.
Note: Failed to determine version of package linenoise at .. 
Assuming ~master.
Note: Failed to determine version of package drepl at .. Assuming 
~master.
Note: Failed to determine version of package mir-blas at .. 
Assuming ~master.
Note: Failed to determine version of package rdub at .. Assuming 
~master.
Note: Failed to determine version of package testing_mir_glas at 
.. Assuming ~ma
ster.
The determined compiler type "ldc" doesn't match the expected 
type "dmd". This w
ill probably result in build errors.
Refreshing local packages (refresh existing: false)...
Looking for local package map at 
C:\ProgramData\dub\packages\local-packages.json

Looking for local package map at 
C:\Users\[user]\AppData\Roaming\dub\packages\l
ocal-packages.json
Try to load local package map at 
C:\Users\[user]\AppData\Roaming\dub\packages\l
ocal-packages.json
Note: Failed to determine version of package mir-algorithm at .. 
Assuming ~maste
r.
Note: Failed to determine version of package lubeck at .. 
Assuming ~master.
Note: Failed to determine version of package mir-cpuid at .. 
Assuming ~master.
Note: Failed to determine version of package mir-glas at .. 
Assuming ~master.
Note: Failed to determine version of package mir-lapack at .. 
Assuming ~master.
Note: Failed to determine version of package mir-random at .. 
Assuming ~master.
Note: Failed to determine version of package scid at .. Assuming 
~master.
Note: Failed to determine version of package cblas at .. Assuming 
~master.
Note: Failed to determine version of package lapack at .. 
Assuming ~master.
Note: Failed to determine version of package numir at .. Assuming 
~master.
Note: Failed to determine version of package drepl at .. Assuming 
~master.
Note: Failed to determine version of package colorize at .. 
Assuming ~master.
Note: Failed to determine version of package libdparse at .. 
Assuming ~master.
Note: Failed to determine version of package linenoise at .. 
Assuming ~master.
Note: Failed to determine version of package drepl at .. Assuming 
~master.
Note: Failed to determine version of package mir-blas at .. 
Assuming ~master.
Note: Failed to determine version of package rdub at .. Assuming 
~master.
Note: Failed to determine version of package testing_mir_glas at 
.. Assuming ~ma
ster.
   Found dependency lubeck 0.0.3
     Found dependency mir-lapack 0.0.3
       Found dependency mir-algorithm 0.6.6
       Found dependency lapack 0.0.2
     Found dependency mir-blas 0.0.2
       Found dependency cblas 2.0.0
   Found dependency numir 0.0.4
     Found dependency mir-random 0.2.5
   Found dependency mir-cpuid 0.5.2
Refreshing local packages (refresh existing: false)...
Looking for local package map at 
C:\ProgramData\dub\packages\local-packages.json

Looking for local package map at 
C:\Users\[user]\AppData\Roaming\dub\packages\l
ocal-packages.json
Try to load local package map at 
C:\Users\[user]\AppData\Roaming\dub\packages\l
ocal-packages.json
Note: Failed to determine version of package mir-algorithm at .. 
Assuming ~maste
r.
Note: Failed to determine version of package lubeck at .. 
Assuming ~master.
Note: Failed to determine version of package mir-cpuid at .. 
Assuming ~master.
Note: Failed to determine version of package mir-glas at .. 
Assuming ~master.
Note: Failed to determine version of package mir-lapack at .. 
Assuming ~master.
Note: Failed to determine version of package mir-random at .. 
Assuming ~master.
Note: Failed to determine version of package scid at .. Assuming 
~master.
Note: Failed to determine version of package cblas at .. Assuming 
~master.
Note: Failed to determine version of package lapack at .. 
Assuming ~master.
Note: Failed to determine version of package numir at .. Assuming 
~master.
Note: Failed to determine version of package drepl at .. Assuming 
~master.
Note: Failed to determine version of package colorize at .. 
Assuming ~master.
Note: Failed to determine version of package libdparse at .. 
Assuming ~master.
Note: Failed to determine version of package linenoise at .. 
Assuming ~master.
Note: Failed to determine version of package drepl at .. Assuming 
~master.
Note: Failed to determine version of package mir-blas at .. 
Assuming ~master.
Note: Failed to determine version of package rdub at .. Assuming 
~master.
Note: Failed to determine version of package testing_mir_glas at 
.. Assuming ~ma
ster.
   Found dependency lubeck 0.0.3
     Found dependency mir-lapack 0.0.3
       Found dependency mir-algorithm 0.6.6
       Found dependency lapack 0.0.2
     Found dependency mir-blas 0.0.2
       Found dependency cblas 2.0.0
   Found dependency numir 0.0.4
     Found dependency mir-random 0.2.5
   Found dependency mir-cpuid 0.5.2
Checking for upgrades.
Search for versions of lubeck (1 package suppliers)
Return for lubeck: [0.0.3]
Search for versions of mir-lapack (1 package suppliers)
Return for mir-lapack: [0.0.3]
Search for versions of mir-algorithm (1 package suppliers)
Return for mir-algorithm: [0.6.6]
Search for versions of lapack (1 package suppliers)
Return for lapack: [0.0.2]
Search for versions of mir-blas (1 package suppliers)
Return for mir-blas: [0.0.2]
Search for versions of cblas (1 package suppliers)
Return for cblas: [2.0.0]
Search for versions of numir (1 package suppliers)
Return for numir: [0.0.4]
Search for versions of mir-random (1 package suppliers)
Return for mir-random: [0.2.5]
Search for versions of mir-cpuid (1 package suppliers)
Return for mir-cpuid: [0.5.2]
Package mir-lapack contains invalid dependency mir-algorithm (no 
version candida
tes) (ci=1)
Package mir-blas contains invalid dependency mir-algorithm (no 
version candidate
s) (ci=4)
Root package testing_mir_glas reference mir-algorithm >=0.6.6 
cannot be satisfie
d.
Jun 28 2017
parent reply jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 28 June 2017 at 19:54:01 UTC, jmh530 wrote:
 [snip]
Does not seem to be a problem for another project using dub with dmd and similar dependencies...
Jun 28 2017
parent reply jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 28 June 2017 at 20:18:20 UTC, jmh530 wrote:
 On Wednesday, 28 June 2017 at 19:54:01 UTC, jmh530 wrote:
 [snip]
Does not seem to be a problem for another project using dub with dmd and similar dependencies...
After spending some time looking through the dub issues, I found that you can use the option --nodeps effectively as an offline mode. The code compiles with --nodeps, but still fails without it.
Jun 28 2017
parent jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 28 June 2017 at 21:25:18 UTC, jmh530 wrote:
 On Wednesday, 28 June 2017 at 20:18:20 UTC, jmh530 wrote:
 On Wednesday, 28 June 2017 at 19:54:01 UTC, jmh530 wrote:
 [snip]
Does not seem to be a problem for another project using dub with dmd and similar dependencies...
After spending some time looking through the dub issues, I found that you can use the option --nodeps effectively as an offline mode. The code compiles with --nodeps, but still fails without it.
I discovered that this issue was that I imported one package in the main function and then another package had a dependency on a lower version of that package.
Jun 29 2017