Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use shorter extension names #190

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[extensions]
AccessorsAxisKeysExt = "AxisKeys"
AccessorsDatesExt = "Dates"
AccessorsIntervalSetsExt = "IntervalSets"
AccessorsLinearAlgebraExt = "LinearAlgebra"
AccessorsStaticArraysExt = "StaticArrays"
AccessorsStructArraysExt = "StructArrays"
AccessorsTestExt = "Test"
AccessorsUnitfulExt = "Unitful"
AxisKeysExt = "AxisKeys"
DatesExt = "Dates"
IntervalSetsExt = "IntervalSets"
LinearAlgebraExt = "LinearAlgebra"
StaticArraysExt = "StaticArrays"
StructArraysExt = "StructArrays"
TestExt = "Test"
UnitfulExt = "Unitful"

[compat]
AxisKeys = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion ext/AccessorsAxisKeysExt.jl → ext/AxisKeysExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsAxisKeysExt
module AxisKeysExt
using Accessors
using AxisKeys

Expand Down
2 changes: 1 addition & 1 deletion ext/AccessorsDatesExt.jl → ext/DatesExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsDatesExt
module DatesExt

using Accessors
import Accessors: set
Expand Down
2 changes: 1 addition & 1 deletion ext/AccessorsIntervalSetsExt.jl → ext/IntervalSetsExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsIntervalSetsExt
module IntervalSetsExt
using Accessors
using IntervalSets

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsLinearAlgebraExt
module LinearAlgebraExt

import Accessors: set, @set
using LinearAlgebra: norm, normalize, diag, diagind
Expand Down
2 changes: 1 addition & 1 deletion ext/AccessorsStaticArraysExt.jl → ext/StaticArraysExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsStaticArraysExt
module StaticArraysExt
isdefined(Base, :get_extension) ? (using StaticArrays) : (using ..StaticArrays)
using Accessors
import Accessors: setindex, delete, insert
Expand Down
2 changes: 1 addition & 1 deletion ext/AccessorsStructArraysExt.jl → ext/StructArraysExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsStructArraysExt
module StructArraysExt
using Accessors
using StructArrays

Expand Down
2 changes: 1 addition & 1 deletion ext/AccessorsTestExt.jl → ext/TestExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsTestExt
module TestExt

using Accessors
using Test: @test
Expand Down
2 changes: 1 addition & 1 deletion ext/AccessorsUnitfulExt.jl → ext/UnitfulExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AccessorsUnitfulExt
module UnitfulExt

import Accessors: set
using Unitful
Expand Down
8 changes: 4 additions & 4 deletions src/Accessors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ include("functionlenses.jl")
include("testing.jl")

if !isdefined(Base, :get_extension)
include("../ext/AccessorsDatesExt.jl")
include("../ext/AccessorsLinearAlgebraExt.jl")
include("../ext/AccessorsTestExt.jl")
include("../ext/DatesExt.jl")
include("../ext/LinearAlgebraExt.jl")
include("../ext/TestExt.jl")
end
Comment on lines 19 to 23
Copy link
Member

Choose a reason for hiding this comment

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

Not this PR. But what do you think about bumping julia version to the current LTS 1.10 and getting rid of Requires and other legacy compat?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, can easily be done now that it's the lts!


function __init__()
@static if !isdefined(Base, :get_extension)
@require StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" include("../ext/AccessorsStaticArraysExt.jl")
@require StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" include("../ext/StaticArraysExt.jl")
end
if isdefined(Base.Experimental, :register_error_hint)
Base.Experimental.register_error_hint(MethodError) do io, exc, argtypes, kwargs
Expand Down
Loading