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

Add unitful extension with convenience dispatches #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgroenks96
Copy link
Collaborator

This is a very minor addition, but I have been pirating these convenience dispatches in my own code for a while now. It would be nice to actually add them to the package via an extension.

@bgroenks96
Copy link
Collaborator Author

@rafaqz I am getting a type inference test failure on 1.10.4 that appears unrelated to this PR (happens on master too). Are you aware of it?

Tables interface: Error During Test at /home/bgroenke/.julia/dev/ModelParameters/test/runtests.jl:156
  Got exception outside of a @test
  return type Model does not match inferred return type Any
  Stacktrace:
   [1] error(s::String)
     @ Base ./error.jl:35
   [2] macro expansion
     @ ~/.julia/dev/ModelParameters/test/runtests.jl:180 [inlined]
   [3] macro expansion
     @ ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [4] top-level scope
     @ ~/.julia/dev/ModelParameters/test/runtests.jl:157
   [5] include(fname::String)
     @ Base.MainInclude ./client.jl:489
   [6] top-level scope
     @ none:6
   [7] eval
     @ ./boot.jl:385 [inlined]
   [8] exec_options(opts::Base.JLOptions)
     @ Base ./client.jl:291
   [9] _start()
     @ Base ./client.jl:552
Test Summary:    | Pass  Error  Total  Time
Tables interface |    9      1     10  2.6s

@rafaqz
Copy link
Owner

rafaqz commented Aug 23, 2024

Oh not sure what that is from . Maybe Julia got worse at working out the type somewhere?. It seems we need go use Base.@assume_effects more and more to force these things.

@@ -14,6 +14,12 @@ import AbstractNumbers,

using Setfield

using PackageExtensionCompat

function __init__()
Copy link
Owner

Choose a reason for hiding this comment

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

Hmm I don't love __init__() blocks... can we just minimum bound to 1.10? It will be the LTS version very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants