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

Cache invalidation doesn't work in node make build #9997

Open
bryevdv opened this issue May 8, 2020 · 6 comments
Open

Cache invalidation doesn't work in node make build #9997

bryevdv opened this issue May 8, 2020 · 6 comments

Comments

@bryevdv
Copy link
Member

bryevdv commented May 8, 2020

Have tried all of the following tp get unstuck, to no avail:

  • npm cache clear --force
  • rm -rf node_modules
  • updating to nodejs 12.x

Also tried manually installing esquery after all that. Always get:

[19:10:02] Starting 'compiler:build'...
[19:10:03] Failed 'compiler:build' after 521 ms
[19:10:03] Error: '/Users/bryan/work/bokeh/bokehjs/node_modules/esquery/esquery.js doesn't exist
[19:10:03]     at Linker.new_module (/Users/bryan/work/bokeh/bokehjs/src/compiler/linker.ts:552:13)
[19:10:03]     at Linker.resolve (/Users/bryan/work/bokeh/bokehjs/src/compiler/linker.ts:711:27)
[19:10:03]     at Linker.link (/Users/bryan/work/bokeh/bokehjs/src/compiler/linker.ts:267:28)
[19:10:03]     at Task.fn (/Users/bryan/work/bokeh/bokehjs/make/tasks/compiler.ts:31:27)
[19:10:03]     at exec_task (/Users/bryan/work/bokeh/bokehjs/make/task.ts:147:34)
[19:10:03]     at _run (/Users/bryan/work/bokeh/bokehjs/make/task.ts:176:24)
[19:10:03]     at _run (/Users/bryan/work/bokeh/bokehjs/make/task.ts:168:26)
[19:10:03]     at _run (/Users/bryan/work/bokeh/bokehjs/make/task.ts:168:26)
[19:10:03]     at Object.run (/Users/bryan/work/bokeh/bokehjs/make/task.ts:192:22)
[19:10:03]     at main (/Users/bryan/work/bokeh/bokehjs/make/main.ts:18:16)
@bryevdv
Copy link
Member Author

bryevdv commented May 8, 2020

Manually installing esquery 0.4 "fixes":

(dev) ❯ ls node_modules/esquery
README.md  esquery.js  license.txt  package.json  parser.js

@RyanRio
Copy link
Contributor

RyanRio commented May 8, 2020

Same error and then one additional error on Windows (Windows 10 in conda environment):
timezone error:
image

Then the esquery error:
image

When installing esquery manually with npm install esquery@0.4 I now get this error:
image

@mattpap
Copy link
Contributor

mattpap commented May 11, 2020

I can now reproduce some form of this issue on Linux:

Failed 'compiler:build' after 1.00 s
[17:30:38] Error: '/home/mateusz/repo/bokeh/bokehjs/node_modules/esquery/dist/esquery.min.js doesn't exist

@mattpap
Copy link
Contributor

mattpap commented May 11, 2020

The problem is with caching in bokehjs' build, which doesn't recognize structural changes to packages and fails to invalidate itself. If you see those error messages, then a workaround is to issue node make build --rebuild (this ignores the cache). This wasn't caught by my earlier attempt to reproduce this (PR #9991), because in CI we always build from scratch.

@mattpap mattpap changed the title [BUG] Can't build BokehJS on OSX Cache invalidation doesn't work in node make build May 11, 2020
@RyanRio
Copy link
Contributor

RyanRio commented May 11, 2020

Workaround solves the issue on Windows too - I'm trying to figure out where the caching problem you've pointed out exists but I'm having a tough time since the error can happen in multiple tasks. Is there a specific ts file where the caching functionality is written?

@mattpap
Copy link
Contributor

mattpap commented May 11, 2020

@RyanRio, bokehjs/src/compiler/linker.ts which is then used in bokehjs/make/tasks/*.

@bryevdv bryevdv modified the milestones: 2.1, next May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants