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

streams module fails to compile when using -d:useNimRTL and -mm:arc #23162

Open
bbbscarter opened this issue Jan 3, 2024 · 0 comments · May be fixed by #23163
Open

streams module fails to compile when using -d:useNimRTL and -mm:arc #23162

bbbscarter opened this issue Jan 3, 2024 · 0 comments · May be fixed by #23163
Assignees

Comments

@bbbscarter
Copy link

Description

Repro steps:

  • Create a nim file with the following:
    import streams
  • Compile with nim c -d:useNimRtl
  • Observe compile error
  • Remove -d:useNimRTL or use -mm:refc
  • Observe the error goes away.

Nim Version

2.02 (and most recent head revision 20d79c9).

Current Output

`/Users/scarter/dev/nim/nim-source/lib/pure/streams.nim(1306, 30) Error: type mismatch: got 'proc (s: Stream, buffer: var string, slice: Slice[system.int]): int{.noSideEffect, gcsafe.}' for 'ssReadDataStr' but expected 'proc (s: Stream, buffer: var string, slice: Slice[system.int]): int{.nimcall, gcsafe.}'
.raise effects differ`

Expected Output

No response

Possible Solution

No response

Additional Information

Unfortunately, the workarounds of removing useNimRtl or mm:refc aren't viable for my use-case; I'm building an application with shared modules and:

  • Without useNimRtl 'assert' silently hangs the app.
  • Using mm:refc causes a segfault when copying strings (trying to create a minimal repro at the moment).
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 a pull request may close this issue.

2 participants