-
Notifications
You must be signed in to change notification settings - Fork 45
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
Error loading a table from a gsheet #556
Comments
The table is
And Pyret produces
Which of those values look wrong to you? |
@blerner Are you able to run the program I linked, and evaluate |
I ran it and literally copied and pasted cpo's output. I see no problem on my machine. It runs in both Firefox and Chrome. |
@blerner oh crap - looks like the teacher tweaked the numbers to avoid the bug. Sorry, I didn't think they'd touch the file! I re-made the file and spreadsheet, and edited the issue text to use the new link. |
I see it now. This is a @ds26gte bug to fix: https://github.com/brownplt/code.pyret.org/blob/horizon/src/web/js/output-ui.js#L1402 passes in only three arguments to Looking at the usages of this function: in pyret-lang, the options argument is always
and in cpo, both uses forget to pass the extra argument at all.
(@ds26gte , I know we've talked about this before: we really do need a thorough test suite of every possible trigger of every possible NumberErrback, to make sure we've threaded them through correctly in all call-sites...) |
@blerner while I agree that a thorough test suite would be ideal, I think we can get most of the way there simply by invoking the TypeScript compiler on a minimally-annotated version of the file. I spent a little time this morning doing that, and GitHub won't let me attach a |
Whatever this type-annotated delta is over the original file, we should be able to write unit tests for each such modified call site, right? |
Presumably, but it may be hard to trace the series of calls through Pyret that make it through to the offending call sites. If we're planning on sticking with this number implementation for a LONG time, I'd suggest breaking it off as a separate repo and writing unit tests just for js-nums. And if the thinking is that we're eventually moving to |
Joy reported this from a teacher...
Run this program, then evaluate
Cell-Table
in the interactions area. You can load the spreadsheet linked from the Pyret file to check out what's going on.It looks like Pyret's importing-from-google-sheets functionality is getting tripped up by extremely small values in google sheets.
The text was updated successfully, but these errors were encountered: