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

ability to parse from file? #11

Open
AKST opened this issue Aug 15, 2016 · 3 comments
Open

ability to parse from file? #11

AKST opened this issue Aug 15, 2016 · 3 comments

Comments

@AKST
Copy link

AKST commented Aug 15, 2016

Hey, I'm wondering how much modification would be required to enable this library to parse input from a file? Because at the moment it looks like you would need to load an entire file into memory to parse it, where as it could be more efficiently handled via reading a file with a fix sized buffer, this way memory usage would be constant (with the exception of building the TOML data structure).

For my purposes, I think reading the file into memory I can live with, but it's something I'd prefer not to have to do.

@jonstoler
Copy link
Owner

This is an excellent idea, and something I wasn't thinking about when writing the library.

Unfortunately, that also means it will take a bit of refactoring to get it to work. Thankfully I don't think it will require too much! It's just not a quick and easy patch.

I'm labelling this as an enhancement but now that TOML 0.4.0 is supported, there isn't a lot left to work on, so hopefully I can get this working soon. As always, contributions are welcome.

@AKST
Copy link
Author

AKST commented Aug 17, 2016

Unfortunately, that also means it will take a bit of refactoring to get it to work. Thankfully I don't think it will require too much! It's just not a quick and easy patch.

I'd be willing to help where I can if you can offer some guidance on a recommended approach to refactoring

pocomane pushed a commit to pocomane/lua-toml that referenced this issue Nov 30, 2018
…line report temporary removed; error reporting not tested.
@jerome-diver
Copy link

jerome-diver commented Jan 8, 2021

so hopefully I can get this working soon

Hi and thank you for this library, do you have a branch to switch git on, to rich this new feature ?
I'm thinking same than @AKST that, if you can offer some guidance on a recommended approach i should try to help with that.

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

No branches or pull requests

3 participants