Skip to content

Commit

Permalink
Pkg: now included in the system image.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Jan 13, 2013
1 parent 7e7f4f6 commit 0971b3b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions base/export.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export
RNG,
Math,
Sort,
Pkg,

# Types
AbstractMatrix,
Expand Down
11 changes: 5 additions & 6 deletions base/pkg.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
require("git")
require("pkgmetadata")
require("pkgresolve")

module Pkg
#
# Julia's git-based declarative package manager
#

include("pkg/metadata.jl")
include("pkg/resolve.jl")

using Metadata
using PkgResolve
using Resolve

import Git

Expand Down Expand Up @@ -209,7 +208,7 @@ function _resolve()
end
end
sort!(reqs)
want = PkgResolve.resolve(reqs)
want = Resolve.resolve(reqs)
pkgs = sort!(keys(merge(want,have)))
for pkg in pkgs
if has(have,pkg)
Expand Down
5 changes: 0 additions & 5 deletions base/pkgmetadata.jl → base/pkg/metadata.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
require("linprog")

module Metadata

using LinProgGLPK

import Git
import GLPK
import Base.isequal, Base.isless, Base.contains, Base.hash

export parse_requires, Version, VersionSet
Expand Down
6 changes: 2 additions & 4 deletions base/pkgresolve.jl → base/pkg/resolve.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require("pkgmetadata")

module PkgResolve
module Resolve
#
# Use max-sum algorithm to resolve packages dependencies
#
Expand Down Expand Up @@ -1018,4 +1016,4 @@ function resolve(reqs)
return compute_output_dict(reqsstruct, pkgstruct, sol)
end

end # module PkgResolve
end # module
4 changes: 4 additions & 0 deletions base/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ using DSP
# deprecated functions
include("deprecated.jl")

# git utils & package manager
include("git.jl")
include("pkg.jl")

include = include_from_node1
print("\e[0G\e[2K")

Expand Down

10 comments on commit 0971b3b

@StefanKarpinski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that I have a 5-second Julia startup time and was concerned that this change was causing it, but even without this commit, I still see that, so something added a lot of startup time somewhere along the way, but this doesn't seem to be it.

@johnmyleswhite
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you maybe start loading DataFrames by default?

@StefanKarpinski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope.

@ViralBShah
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just introduced subdirectories in Base. It is now difficult to resist the temptation to have more subdirectories.

@ViralBShah
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starts in about 3 seconds for me. No noticeable difference.

@StefanKarpinski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just the fact that my machine is slowly dying..

@StefanKarpinski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did introduce subdirectories. If everyone hates that, it's easy to undo. I would argue that base is getting big enough that some subdirectories might be called for. But I don't care much either way.

@johnmyleswhite
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for subdirectories

@ViralBShah
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeffBezanson has stronger views on subdirectories. I do agree that base has become big and subdirectories would help. Hopefully, Base will only become smaller now from where we are.

@JeffBezanson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Base should really not get much bigger.

Please sign in to comment.