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

Add missing close(io) to hohqmesh_tutorial.jl #1574

Closed
wants to merge 1 commit into from
Closed

Conversation

jlchan
Copy link
Contributor

@jlchan jlchan commented Jul 18, 2023

No description provided.

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

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

This shouldn't be necessary, is it? Everything is inside

open("out/ice_cream_straight_sides.control", "w") do io

so it will close the file correctly after writing to it according to the docs

help?> open
search: open isopen propertynames ComposedFunction CompositeException operm hasproperty getproperty setproperty!

  open(f::Function, args...; kwargs...)

  Apply the function f to the result of open(args...; kwargs...) and close the resulting file descriptor upon
  completion.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> write("myfile.txt", "Hello world!");
  
  julia> open(io->read(io, String), "myfile.txt")
  "Hello world!"
  
  julia> rm("myfile.txt")

@jlchan
Copy link
Contributor Author

jlchan commented Jul 19, 2023

Hm, that's odd. @MarkLopat and i were noticing that the control file was being unexpectedly changed when written. I assumed it was due to the close statement but looks like I was wrong.

@MarkLopat can you recheck using a restarted REPL that you still see those weird changes to the control file when running this command?

@jlchan
Copy link
Contributor Author

jlchan commented Nov 7, 2023

Closing since the issue appears to be unrelated to close(io)

@jlchan jlchan closed this Nov 7, 2023
@ranocha ranocha deleted the jlchan-patch-1 branch November 7, 2023 18:42
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