Coder Social home page Coder Social logo

Comments (6)

lobingera avatar lobingera commented on August 22, 2024

and "using Printf":

lobi@orange4:~/juliarepo$ ../julia07/julia 
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.3183 (2017-12-25 07:17 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 4b74a74* (0 days old master)
|__/                   |  x86_64-linux-gnu

julia> using Printf

julia> Pkg.test("Colors")
I- Computing test dependencies for Colors... -Info:Base.Pkg.Entry:entry.jl:707
I- Installing JLD2 v0.0.4 -Info:Base.Pkg.Entry:entry.jl:537
I- Testing Colors -Info:Base.Pkg.Entry:entry.jl:717
WARNING: importing deprecated binding Base.@sprintf into Colors.
ERROR: LoadError: LoadError: LoadError: LoadError: Base.@sprintf has been moved to the standard library package Printf.
Restart Julia and then run `using Printf` to load it.
Stacktrace:
 [1] error(::Function, ::String, ::String, ::String, ::String, ::String, ::String) at ./error.jl:42
 [2] #@sprintf#919(::NamedTuple{(),Tuple{}}, ::Function, ::LineNumberNode, ::Vararg{Any,N} where N) at ./deprecated.jl:138
 [3] @sprintf(::Vararg{Any,N} where N) at ./deprecated.jl:138
 [4] #macroexpand#37 at ./expr.jl:75 [inlined]
 [5] macroexpand at ./expr.jl:74 [inlined]
 [6] docm(::LineNumberNode, ::Module, ::String, ::Expr, ::Bool) at ./docs/Docs.jl:657 (repeats 2 times)
 [7] @doc(::LineNumberNode, ::Module, ::String, ::Vararg{Any,N} where N) at ./boot.jl:411
 [8] include at ./boot.jl:295 [inlined]
 [9] include_relative(::Module, ::String) at ./loading.jl:503
 [10] include at ./sysimg.jl:26 [inlined]
 [11] include(::String) at /home/lobi/.julia/v0.7/Colors/src/Colors.jl:3
 [12] top-level scope
 [13] include at ./boot.jl:295 [inlined]
 [14] include_relative(::Module, ::String) at ./loading.jl:503
 [15] include(::Module, ::String) at ./sysimg.jl:26
 [16] top-level scope
 [17] eval at ./boot.jl:298 [inlined]
 [18] top-level scope at ./<missing>:2
in expression starting at /home/lobi/.julia/v0.7/Colors/src/utilities.jl:19
in expression starting at /home/lobi/.julia/v0.7/Colors/src/utilities.jl:12
in expression starting at /home/lobi/.julia/v0.7/Colors/src/utilities.jl:12
in expression starting at /home/lobi/.julia/v0.7/Colors/src/Colors.jl:30
ERROR: LoadError: Failed to precompile Colors to /home/lobi/.julia/lib/v0.7/Colors.ji.
Stacktrace:
 [1] error at ./error.jl:33 [inlined]
 [2] compilecache(::String) at ./loading.jl:630
 [3] compilecache at ./loading.jl:587 [inlined]
 [4] _require(::Symbol) at ./loading.jl:442
 [5] require(::Symbol) at ./loading.jl:315
 [6] include at ./boot.jl:295 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:503
 [8] include(::Module, ::String) at ./sysimg.jl:26
 [9] process_options(::Base.JLOptions) at ./client.jl:330
 [10] _start() at ./client.jl:381

from colors.jl.

timholy avatar timholy commented on August 22, 2024

Precompilation happens in a separate process. Need to add it to the package.

from colors.jl.

lobingera avatar lobingera commented on August 22, 2024

You mean, the issue needs to be reported somewhere else?

from colors.jl.

timholy avatar timholy commented on August 22, 2024

Sorry for being unnecessarily confusing. I simply meant that saying using Printf in the REPL doesn't help the package get through precompilation. It's presumably an error message intended for those who trigger it from the REPL.

All that should be necessary is adding using Printf in src/Colors.jl, appropriately conditional on the Julia version.

from colors.jl.

ararslan avatar ararslan commented on August 22, 2024

Printf is now available in Compat as of v0.41.0, so you can do using Compat.Printf.

from colors.jl.

timholy avatar timholy commented on August 22, 2024

Works now.

from colors.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.