代码之家  ›  专栏  ›  技术社区  ›  Alex__S12

无法在本地复制我的travis ci无法满足的需求

  •  0
  • Alex__S12  · 技术社区  · 6 年前

    我有一个Julia项目,配置为在travis ci中运行单元测试,我收到了其他人的请求。julia 0.7的测试通过了,但julia 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中,依赖关系没有得到正确的解决,这是怎么回事?

    0 回复  |  直到 6 年前
        1
  •  2
  •   fredrikekre    6 年前

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

    你在本地做的和在CI上做的不一样。在CI上,测试将以包作为活动环境运行,而在本地测试时,则从全局环境进行测试( (v1.1) 在这种情况下)。如果您使用 FlightMechanics 作为活跃的环境。

    在travis ci中,依赖关系没有得到正确的解决,这是怎么回事?

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

    您可以更新 显示汤姆 ( pkg> up 当您将包作为活动环境时)或将其从回购中删除并添加到 .gitignore .