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

use the correct TOML.Parser coupled to Base.TOMLCache #3782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Feb 7, 2024

const TOML_LOCK = ReentrantLock()
_parsefile(toml_file::AbstractString) = Base.parsed_toml(toml_file, TOML_CACHE, TOML_LOCK)
function parsefile(in_memory_registry::Union{Dict, Nothing}, folder::AbstractString, file::AbstractString)
if in_memory_registry === nothing
return _parsefile(joinpath(folder, file))
else
content = in_memory_registry[to_tar_path_format(file)]
return TOML.Internals.parse(TOML.Parser(content; filepath=file))
return TOML.Internals.parse(Base.TOML.Parser(content; filepath=file))
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Seems odd to use TOML.Internals here but pass Base.TOML as an argument. Maybe instead change using TOML to using Base.TOML at the top of the file?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

bump?

@JeffBezanson
Copy link
Sponsor Member

Bump

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 12, 2024

bump?

@KristofferC
Copy link
Sponsor Member Author

I don't know why this was put on the milestone, it's been like this for years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pkg precompile error with current master
3 participants