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

alternative to fraction field for progress on open-ended tasks #39

Open
goretkin opened this issue Mar 2, 2021 · 0 comments
Open

alternative to fraction field for progress on open-ended tasks #39

goretkin opened this issue Mar 2, 2021 · 0 comments

Comments

@goretkin
Copy link

goretkin commented Mar 2, 2021

The Progress type has a fraction field, and I am considering an alternative that stores two quantities e.g. completed and total, which conceptually are just the numerator and denominator of the fraction.

Having that structure, however, allows the denominator to take on a sentinel value (perhaps 0, perhaps -1, perhaps missing) in order to log progress on tasks with an unknown amount of steps.

I think it's a worthwhile idea to explore.

The Progress type could acquire additional fields, and keep the fraction field redundantly.
This would keep e.g. VSCodeServer working.

I would prefer not keeping this redundant information, but the default behavior for serializing the object is based on fieldnames not propertynames: https://github.com/JuliaIO/JSON.jl/blob/4b3913d58f04cc5bb2f8d23c6ef82e0fbed20525/src/Writer.jl#L23

Furthermore, VSCodeServer.jl vendors JSON.jl, so avoiding the redundant information would require a modification to VSCodeServer.jl itself. I think that's the winning solution, but perhaps there's an alternative that I am missing.

Related: #27 (comment)

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

No branches or pull requests

1 participant