source-academy / modules

Modules that can be imported by programs in Source Academy, an online experiential environment for computational thinking
Apache License 2.0
8 stars 29 forks source link

[CSG]: Recent changes broke patch's colorizePolygons #265

Closed Cloud7050 closed 7 months ago

Cloud7050 commented 11 months ago

When attempting to run the snowglobe sample, the following error is shown in the REPL:

Line 11: ReferenceError: colorizePolygons is not defined

That name occurs in the JSCAD modelling library's patch file. It would appear that recent changes in master may have broken the CSG module.

Line 11 calls intersect() from the CSG module. A trivial example such as render(cube(silver)) still works without error.

Cloud7050 commented 11 months ago

@leeyi45 would you happen to know of anything related to the build system that may have changed recently such that this would be impacted?

martin-henz commented 11 months ago

I can confirm that the problem exists as of today, in sourceacademy.org. Here is the direct share link: https://share.sourceacademy.org/ab906

leeyi45 commented 11 months ago

I bumped the version of esbuild, that is the only possible breaking change that comes to mind

joeng03 commented 7 months ago

Update: render(cube(silver)) also does not currently work at https://share.sourceacademy.org/ab906

joeng03 commented 7 months ago

@leeyi45 at which commit was the version on esbuild bumped?

Cloud7050 commented 7 months ago

Update: render(cube(silver)) also does not currently work at https://share.sourceacademy.org/ab906

I am currently able to run it:

image

Cloud7050 commented 7 months ago

@leeyi45 at which commit was the version on esbuild bumped?

Likely in cad882252cfd1defc53c78fa4367cef9ef395877.

https://github.com/source-academy/modules/pull/244/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L62-R73

joeng03 commented 7 months ago

I am currently able to run it:

Yep, could also run it locally, but not on the website

Cloud7050 commented 7 months ago

Yep, could also run it locally, but not on the website

I followed the share link and edited it there. So it was actually running on sourceacademy.org.

Testing on both deployments, neither org nor NUS can run the snowglobe snippet, but they can run the cube.

If the snowglobe works locally, perhaps that's a clue?