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

Fix behavior of copy and similar #12

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

MilesCranmer
Copy link
Contributor

Fixes #11

@bkamins bkamins merged commit 9136dca into JuliaArrays:master Mar 27, 2024
0 of 15 checks passed
@@ -51,6 +51,12 @@ end
fa = f()
@test fa isa ReadOnlyArray{Float64,2}
@test fa == x

a = ReadOnly([1, 2])
Copy link
Member

Choose a reason for hiding this comment

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

ReadOnly doesn't seem to be defined:

(ReadOnlyArrays) pkg> test
  No Changes to `~/.julia/dev/ReadOnlyArrays/Project.toml`
  No Changes to `~/.julia/dev/ReadOnlyArrays/Manifest.toml`
     Testing ReadOnlyArrays
      Status `/tmp/jl_Dsjfkt/Project.toml`
  [988b38a3] ReadOnlyArrays v0.2.0 `~/.julia/dev/ReadOnlyArrays`
  [8dfed614] Test
      Status `/tmp/jl_Dsjfkt/Manifest.toml`
  [988b38a3] ReadOnlyArrays v0.2.0 `~/.julia/dev/ReadOnlyArrays`
  [2a0f44e3] Base64
  [b77e0a4c] InteractiveUtils
  [56ddb016] Logging
  [d6f4376e] Markdown
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [8dfed614] Test
     Testing Running tests...
Test Summary: | Pass  Total  Time
Constructors  |    3      3  0.0s
misc: Error During Test at /home/tim/.julia/dev/ReadOnlyArrays/test/runtests.jl:46
  Got exception outside of a @test
  UndefVarError: `ReadOnly` not defined
  Stacktrace:
    [1] macro expansion
      @ ~/.julia/dev/ReadOnlyArrays/test/runtests.jl:55 [inlined]
    [2] macro expansion
      @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
    [3] macro expansion
      @ ~/.julia/dev/ReadOnlyArrays/test/runtests.jl:47 [inlined]
    [4] macro expansion
      @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
    [5] top-level scope
      @ ~/.julia/dev/ReadOnlyArrays/test/runtests.jl:14
    [6] include(fname::String)
      @ Base.MainInclude ./client.jl:489
    [7] top-level scope
      @ none:6
    [8] eval
      @ ./boot.jl:385 [inlined]
    [9] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:291
   [10] _start()
      @ Base ./client.jl:552
Test Summary: | Pass  Error  Total  Time
Interface     |   22      1     23  1.7s
  size        |    4             4  0.0s
  indexing    |    3             3  0.0s
  iteration   |   11            11  0.1s
  misc        |    4      1      5  1.6s
ERROR: LoadError: Some tests did not pass: 22 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /home/tim/.julia/dev/ReadOnlyArrays/test/runtests.jl:13
ERROR: Package ReadOnlyArrays errored during testing

Copy link
Member

Choose a reason for hiding this comment

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

xref #14

timholy added a commit that referenced this pull request Apr 9, 2024
This modernizes the workflow files, and streamlines the testing
(for a simple package that doesn't seem hardware-specific,
I don't think there's a strong reason to test on so many platforms).
I added Documenter keys specifically for TagBot.

Also fixes typo noticed in #12 (comment).
timholy added a commit that referenced this pull request Apr 9, 2024
This modernizes the workflow files, and streamlines the testing
(for a simple package that doesn't seem hardware-specific,
I don't think there's a strong reason to test on so many platforms).
I added Documenter keys specifically for TagBot.

Also fixes typo noticed in #12 (comment).
timholy added a commit that referenced this pull request Apr 10, 2024
This modernizes the workflow files, and streamlines the testing
(for a simple package that doesn't seem hardware-specific,
I don't think there's a strong reason to test on so many platforms).
I added Documenter keys specifically for TagBot.

Also fixes typo noticed in #12 (comment).
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.

Bug: copy and similar should return parent array type, not ReadOnlyArray
3 participants