Skip to content

Commit

Permalink
Add UUIDs module
Browse files Browse the repository at this point in the history
  • Loading branch information
iamed2 committed Feb 9, 2018
1 parent 95db156 commit 7690966
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ Currently, the `@compat` macro supports the following syntaxes:
* `using Compat.LibGit2` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25706]).

* `using Compat.UUIDs` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25819]).

## New functions, macros, and methods

* `@views` takes an expression and converts all slices to views ([#20164]), while
Expand Down Expand Up @@ -552,4 +555,4 @@ includes this fix. Find the minimum version from there.
[#25706]: https://github.com/JuliaLang/julia/issues/25706
[#25780]: https://github.com/JuliaLang/julia/issues/25780
[#24182]: https://github.com/JuliaLang/julia/issues/24182
[#24673]: https://github.com/JuliaLang/julia/issues/24673
[#24673]: https://github.com/JuliaLang/julia/issues/24673
8 changes: 8 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,14 @@ else
findall(b::OccursIn, a::Number) = a in b.x ? [1] : Vector{Int}()
end

if VERSION >= v"0.7.0-DEV.3666"
import UUIDs
else
@eval module UUIDs
import .Random: uuid1, uuid4, uuid_version
end
end

include("deprecated.jl")

end # module Compat

0 comments on commit 7690966

Please sign in to comment.