You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is already a function to save yaml to a file (encodeFile) but it doesn’t help when I need to save something to a handle (e.g. if I got one from withTempFile).
I think it might be a good idea to change Text.Libyaml.{encode,decode}File to work with a handle.
P.S. In the specific case of withTempFile for some reason just writing to the same file with encodeFile works, while writeFile fails. I have no explanation for this. Might it be a bug somewhere?
The text was updated successfully, but these errors were encountered:
I'm OK with adding such functions, PR welcome. I'm guessing encodeFile works because it's following a different code path for opening the file descriptor, as it's passing the content over to the libyaml C library via the FFI and not using Handles.
There is already a function to save yaml to a file (
encodeFile
) but it doesn’t help when I need to save something to a handle (e.g. if I got one fromwithTempFile
).I think it might be a good idea to change
Text.Libyaml.{encode,decode}File
to work with a handle.P.S. In the specific case of
withTempFile
for some reason just writing to the same file withencodeFile
works, whilewriteFile
fails. I have no explanation for this. Might it be a bug somewhere?The text was updated successfully, but these errors were encountered: