Skip to content

Conversation

@ringabout
Copy link
Member

ref #1534

std/streams is required by std/osproc

@ringabout ringabout mentioned this pull request Nov 11, 2025
@ringabout
Copy link
Member Author

type
  StreamObj* = object of RootObj
    closeImpl*: proc (s: Stream)
      {.nimcall, raises: [IOError, OSError], tags: [WriteIOEffect].}

proc ssClose(s: Stream) =
  var s = StringStream(s)
  s.data = ""

result.closeImpl = ssClose

now gives an error

Error: type mismatch: got: proc (s: ref StreamObj) but wanted: proc (s: ref StreamObj) {.nimcall, raises: [IOError, OSError], tags: [WriteIOEffect].}

Araq pushed a commit that referenced this pull request Nov 11, 2025
@ringabout ringabout marked this pull request as ready for review November 20, 2025 13:20
@ringabout
Copy link
Member Author

ringabout commented Nov 20, 2025

There is still a bug about StringStream in #1561, but should be enough for std/osproc. Good news is that we can do without std/streamwrapper since these functions are only used by peekableOutputStream etc. The documentation will be added after the bug is fixed

@ringabout ringabout mentioned this pull request Nov 24, 2025
3 tasks
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