Skip to content

Conversation

Jean-Dum
Copy link

@Jean-Dum Jean-Dum commented Aug 20, 2025

Description

This follows the discussion in the issue #12532.

The changes made in #12722 where only made on the StaticGroundGeometryPerMaterialBatch.js file, but should have been made on the other Static...Batch files (as the other material types continue to blink when concerned materials are updated).

I ported the changes of this PR on three other Static...Batch files. (the two others does not seems to need those changes).

Issue number and link

Testing plan

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @Jean-Dum!

✅ We can confirm we have a CLA on file for you.

@Jean-Dum Jean-Dum force-pushed the material-flash-fix-2 branch from b19a430 to 450e2e1 Compare August 20, 2025 09:46
@ggetz
Copy link
Contributor

ggetz commented Aug 26, 2025

Thanks for the PR @Jean-Dum! @mzschwartz5 could you please review?

@mzschwartz5
Copy link
Contributor

Sorry for the delay- this slipped off my list but I just remembered it and will be reviewing shortly.

package.json Outdated
Comment on lines 65 to 67
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-html": "^8.1.1",
"eslint-plugin-n": "^17.21.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why these changes are committed; I don't think any packages should need updating for this PR.

(I assume this was in an attempt to resolve some build errors you were having; shouldn't need this though)

@mzschwartz5
Copy link
Contributor

Hi @Jean-Dum, I pulled down your changes (minus the package.json changes, which I restored locally), and I was able to build Cesium with no issue. Have you read through the build guide docs here? (And did you run npm install?)

Otherwise, the changes look good to me. Obviously, I'd want you to test them first, and we'll also need the Spec test files to be updated, and for you to add an entry to CHANGES.md. But yeah, let me know if you still have trouble building.

@Jean-Dum Jean-Dum force-pushed the material-flash-fix-2 branch from 450e2e1 to 2af30b0 Compare September 29, 2025 10:31
@Jean-Dum Jean-Dum force-pushed the material-flash-fix-2 branch from 2af30b0 to e04df47 Compare September 29, 2025 10:37
@Jean-Dum
Copy link
Author

Jean-Dum commented Sep 29, 2025

@mzschwartz5 Thanks for your answer! I reverted my package.json change and was able to install the dependencies. But I struggle a lot just building the code from scratch, it seems like having all dependencies versions marked as equal or higher ("^...") makes the first install really unstable.
I had an error with @zip.js/zip.js not having the dist\zip-web-worker.js file, I manually updated the library to its latest version and it seems to work. Now I have the following issue:

[13:04:36] 'build' errored after 27 s
[13:04:36] Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'yaml' imported from C:\Users\jedum\Documents\cesium\packages\sandcastle\scripts\buildGallery.js
    at Object.getPackageJSONURL (node:internal/modules/package_json_reader:316:9)
    at packageResolve (node:internal/modules/esm/resolve:768:81)
    at moduleResolve (node:internal/modules/esm/resolve:858:18)
    at defaultResolve (node:internal/modules/esm/resolve:990:11)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:755:20)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:732:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:317:38)
    at #link (node:internal/modules/esm/module_job:208:49)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `gulp build`
npm ERR! Exit status 1

Or sometimes this issue (don't know why it isn't the same issue each time):

[14:42:26] TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module ".\file:\C:\Users\jedum\Documents\cesium\packages\sandcastle\sandcastle.config.js" is not a valid package name imported from C:\Users\jedum\Documents\cesium\scripts\build.js
    at parsePackageName (node:internal/modules/package_json_reader:272:11)
    at Object.getPackageJSONURL (node:internal/modules/package_json_reader:283:53)
    at packageResolve (node:internal/modules/esm/resolve:768:81)
    at moduleResolve (node:internal/modules/esm/resolve:858:18)
    at defaultResolve (node:internal/modules/esm/resolve:990:11)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:755:20)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:732:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:317:38)
    at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:683:36)
    at TracingChannel.tracePromise (node:diagnostics_channel:350:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `gulp build`
npm ERR! Exit status 1

I think the dependencies in package.json should really be fixed in order to avoid those issues.

Sorry for wasting your time for solving those little issues, I will make the better pull request possible after that 😊

@mzschwartz5
Copy link
Contributor

Hi @Jean-Dum,

The zip issue your encountering was fixed recently. I suspect your local branch isn't up to date with main. If you merge int he latest changes, that issue should go away.

Your other issues probably stem from not having a clean workspace before npm installing. I would try the following:
git clean -dxf (deletes all files in your directory not tracked by git, including node modules)
npm install

The choice to have package.json mark depedencies as equal or higher is controversial, but it is deliberate. While it can lead to some instability, the general creed is that a library should not lock the apps that consume it to specific dependency versions. It is on the app consuming Cesium to use a package-lock.json file if they wish.

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

Successfully merging this pull request may close these issues.

3 participants