无法在本地重现我的travis-ci无法满足的要求julia错误

时间:2019-06-14 20:27:22

标签: unit-testing package julia travis-ci

我有一个Julia项目配置为在travis-ci中运行单元测试,并且收到其他人的请求请求。茱莉亚0.7的测试通过了,但茱莉亚1.1的测试没有通过。

我收到与无法满足要求https://travis-ci.org/AlexS12/FlightMechanics.jl/jobs/545855260

有关的错误
$ julia --check-bounds=yes --color=yes -e "if VERSION < v\"0.7.0-DEV.5183\"; Pkg.test(\"${JL_PKG}\", coverage=true); else using Pkg; Pkg.test(coverage=true); end"
   Testing FlightMechanics
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DiffResults [163ba53b]:
 DiffResults [163ba53b] log:
 ├─possible versions are: 0.0.1-0.0.4 or uninstalled
 ├─restricted to versions 0.0.3 by an explicit requirement, leaving only versions 0.0.3
 └─restricted by julia compatibility requirements to versions: 0.0.4 or uninstalled — no versions left

但是,如果我使用以下命令在本地对其进行测试,则无法复制它:

xxx@xxx ~ $ cd julia/test/
xxx@xxx ~/julia/test $ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.1.1 (2019-05-16)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.1) pkg> activate .

(test) pkg> status
    Status `~/julia/test/Project.toml`
  [b53c057e] FlightMechanics v0.1.0 #master (https://github.com/parthp08/FlightMechanics.jl.git)

(test) pkg> add https://github.com/parthp08/FlightMechanics.jl.git
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/parthp08/FlightMechanics.jl.git`
 Resolving package versions...
  Updating `~/julia/test/Project.toml`
 [no changes]
  Updating `~/julia/test/Manifest.toml`
 [no changes]

(test) pkg> test FlightMechanics
   Testing FlightMechanics
    Status `/tmp/tmpPfzGFd/Manifest.toml`
  [9e28174c] BinDeps v0.8.10
  [b99e7846] BinaryProvider v0.5.4
  [49dc2e85] Calculus v0.4.1
  [da1fd8a2] CodeTracking v0.5.7
  [bbf7d656] CommonSubexpressions v0.2.0
  [34da2185] Compat v2.1.0
  [864edb3b] DataStructures v0.15.0
  [39dd38d3] Dierckx v0.4.1
  [01453d9d] DiffEqDiffTools v0.11.0
  [163ba53b] DiffResults v0.0.4
  [b552c78f] DiffRules v0.0.10
  [b53c057e] FlightMechanics v0.1.0 #master (https://github.com/parthp08/FlightMechanics.jl.git)
  [f6369f11] ForwardDiff v0.10.3
  [aa1ae85d] JuliaInterpreter v0.6.0
  [d3d80556] LineSearches v7.0.1
  [6f1432cf] LoweredCodeUtils v0.3.5
  [e1d29d7a] Missings v0.4.1
  [d41bc354] NLSolversBase v7.3.1
  [77ba4419] NaNMath v0.3.2
  [429524aa] Optim v0.18.1
  [bac558e1] OrderedCollections v1.1.0
  [d96e819e] Parameters v0.10.3
  [85a6dd25] PositiveFactorizations v0.2.2
  [295af30f] Revise v2.1.6
  [a2af1166] SortingAlgorithms v0.3.1
  [276daf66] SpecialFunctions v0.7.2
  [90137ffa] StaticArrays v0.11.0
  [2913bbd2] StatsBase v0.30.0
  [30578b45] URIParser v0.4.0
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [ade2ca70] Dates  [`@stdlib/Dates`]
  [8bb1440f] DelimitedFiles  [`@stdlib/DelimitedFiles`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [7b1f6079] FileWatching  [`@stdlib/FileWatching`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [76f85450] LibGit2  [`@stdlib/LibGit2`]
  [8f399da3] Libdl  [`@stdlib/Libdl`]
  [37e2e46d] LinearAlgebra  [`@stdlib/LinearAlgebra`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [a63ad114] Mmap  [`@stdlib/Mmap`]
  [44cfe95a] Pkg  [`@stdlib/Pkg`]
  [de0858da] Printf  [`@stdlib/Printf`]
  [3fa0cd96] REPL  [`@stdlib/REPL`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [ea8e919c] SHA  [`@stdlib/SHA`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [1a1011a3] SharedArrays  [`@stdlib/SharedArrays`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [2f01184e] SparseArrays  [`@stdlib/SparseArrays`]
  [10745b16] Statistics  [`@stdlib/Statistics`]
  [8dfed614] Test  [`@stdlib/Test`]
  [cf7118a7] UUIDs  [`@stdlib/UUIDs`]
  [4ec0a83e] Unicode  [`@stdlib/Unicode`]
Test Summary: | Pass  Broken  Total
atmosphere    |   37      10     47
Test Summary: | Pass  Total
coordinates   |   88     88
Test Summary: | Pass  Total
anemometry    |   20     20
Test Summary: | Pass  Total
mechanics     |    9      9
Test Summary:    | Pass  Total
flight mechanics |    2      2
Test Summary: | Pass  Total
pfm           |   16     16
Test Summary: | Pass  Total
mass          |   16     16
Test Summary: | Pass  Total
attitude      |    4      4
Test Summary: | Pass  Total
position      |   16     16
Test Summary: | Pass  Total
aerodynamics  |   16     16
Test Summary: | Pass  Total
aerostate     |    6      6
Test Summary: | Pass  Total
ac: c310      |    8      8
Test Summary: | Pass  Broken  Total
ac: f16       |  223      14    237
   Testing FlightMechanics tests passed 

一切正常,测试通过。

我想这与我的Project.toml有关,但是由于我无法重现错误,所以我对执行该操作感到迷失。贡献者也在他的机器上进行了测试,一切都在为他工作。

为什么我没有得到同样的错误?有什么问题,所以依赖关系在travis-ci中无法正确解决?

1 个答案:

答案 0 :(得分:1)

  

为什么我没有得到同样的错误?

您在本地执行的操作与此处在CI上执行的操作不同。在CI测试中,将程序包作为活动环境运行,而在本地进行测试时,则从全局环境(在这种情况下为(v1.1))进行测试。如果将FlightMechanics作为活动环境运行,将会得到相同的错误。

  

出什么问题了,所以在travis-ci中依赖项无法正确解决?

问题是您的存储库中有一个过时的Manifest.toml文件。使用的清单是活动环境中的清单。

您可以更新Manifest.toml(将程序包作为活动环境时的pkg> up),也可以将其从存储库中删除并将其添加到.gitignore