Closed TheBizzle closed 5 years ago
The "branch" tests failed, because (I think) the "pr-merge" tests and the "branch" ones interfered with one another during the import/export portion of TestModels
. I reran the "pr-merge" tests afterwards, and they passed, so we can consider all of the tests passed.
This looks awesome! I'm a big fan of pulling out the polyfill code into its own home, and of course of letting people get data in and out of their models in a sensible way. I looked through the code and nothing caught my attention.
I pulled the branch down and tried to run it locally and hit a problem. For the Import-A
command tests: Fetch-Integration
, ImportPcolors_2D
, ImportPcolorsTopologyTest_2D
, and RoundTripWithUTF8Chars
threw a null
reference exception in slurpByType()
because the mimeType
was null
from the call to Files.probeContentType()
. I did some brief checking and it looks like Files.probeContentType()
might not be reliable across platforms. The other solutions listed there also don't seem great. I tried letting mimeType == null
through to be slurped as text, and that failed as well, probably because it wasn't really text. I don't have a great solution, since the alternatives seem like a lot of effort for such a small thing that would only be used in development and testing.
Other than that, I think this is good to go.
:sob:
Alright, I've just pushed a fix to the branch. Everything should (hopefully) be in order now. For maximum compatibility, uninstall your old version of the desktop edition of the Fetch extension. (Deleting your ~/.netlogo
folder is a quick and easy way to do this.)
I confirmed the change has things working on my machine now. Waiting for the tests to pass and then I'll merge.
Lord Jeremy, save me, I'm ready for this project to be over.
Here's my summary of what's in this PR:
.js
file, instead of dumping them as janky Scala strings inCompiler.scala
import-pcolors
/import-pcolors-rgb
import-*
prims)export-world
andimport-world
deal with drawing data as base64import-world
(and its ilk) throw runtime errors that suggest using Fetch and Import-A insteadimport-world
in the testing infrastructur, and use the extensions now instead