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

Replace deprecated dataArray with toUnsafeView #547

Closed
wants to merge 1 commit into from

Conversation

asnt
Copy link
Contributor

@asnt asnt commented Dec 30, 2021

Following the hint.

@asnt
Copy link
Contributor Author

asnt commented Jan 3, 2022

Tests fail with Nim 1.0.x.

@mratsim
Copy link
Owner

mratsim commented Jan 3, 2022

image

The issue can probably be solved by:

  • importing std/typetraits in tensor/initialization.nim
  • exporting std/typetraits in tensor/algorithms.nim
  • using mixin DistinctBase in toUnsafeView

https://github.com/mratsim/Arraymancer/runs/4669608372?check_suite_focus=true#step:23:390

This looks like another instance of the generic sandwich nim-lang/Nim#11225

@asnt
Copy link
Contributor Author

asnt commented Jan 4, 2022

@mratsim Thank you. I tried the suggestion without luck.
Does distinctBase exist in nim 1.0.x?:

# test.nim
import std/typetraits
echo type(distinctBase)
# Not OK.
$ choosenim 1.0.10
$ nim c -r test.nim
[...]
/home/u/Arraymancer/test.nim(2, 11) Error: undeclared identifier: 'distinctBase'
# OK.
$ choosenim 1.2.16
$ nim c -r test.nim
[...]
None

@Clonkk
Copy link
Contributor

Clonkk commented Sep 21, 2022

@mratsim I believe this PR can be closed after :

were merged

@Vindaar
Copy link
Collaborator

Vindaar commented Nov 29, 2022

Closing as unnecessary as mentioned by Clonkk. Thanks @asnt though and sorry for not getting it merged!

@Vindaar Vindaar closed this Nov 29, 2022
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.

4 participants