-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from JuliaLang/tk/fixprecompile
Fix loading of precompiled JSON when DataStructures is not present
- Loading branch information
Showing
2 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,13 @@ module Parser #JSON | |
using Compat | ||
|
||
#Define ordered dictionary from DataStructures if present | ||
_HAVE_DATASTRUCTURES = try | ||
using DataStructures | ||
import DataStructures.OrderedDict | ||
true | ||
catch | ||
false | ||
function __init__() | ||
global _HAVE_DATASTRUCTURES = try | ||
@eval import DataStructures.OrderedDict | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tkelman
Author
Contributor
|
||
true | ||
catch | ||
false | ||
end | ||
end | ||
|
||
const TYPES = Any # Union{Dict, Array, AbstractString, Number, Bool, Void} # Types it may encounter | ||
|
Precompiling IJulia (which uses JSON) is giving me:
Why not just
REQUIRE
theDataStructure.jl
module? I don't understand the reason for the conditional import here.