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

feat: auto host mount dev server when running in a codespace #26

Merged
merged 6 commits into from
May 7, 2023

Conversation

jamesdabbs
Copy link
Member

also clarify some documentation to consistently expect pnpm as a package manager / task runner. npm should work equivalently in most cases, but being consistent might help prevent unexpected surprises.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 3, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e11f0d5
Status:⚡️  Build in progress...

View logs

also clarify some documentation to consistently expect `pnpm` as a
package manager / task runner. `npm` _should_ work equivalently in
most cases, but being consistent might help prevent unexpected
surprises.
@jamesdabbs
Copy link
Member Author

@StevenClontz – would you mind kicking the tires on the developer experience here, and let me know if you have any feedback?

(I'm aware that the compile process is erroring currently, but am planning on debugging that bit in another PR.)

@StevenClontz
Copy link
Member

setting up a codespace from this branch now. I'm also available to Zoom a bit if you're free.

@StevenClontz
Copy link
Member

At some point I hit this:

[2023-05-03 15:05:41] waiting for changes...
bundles src/main.ts → public/build/bundle.js...
Killed
/workspaces/web/packages/viewer:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @pi-base/viewer@1.0.0 dev: `rollup -c -w`
Exit status 137

Re-running that script and waiting a bit got things back up and running.

@StevenClontz
Copy link
Member

Actually that is happening quite frequently :-(

@StevenClontz
Copy link
Member

Yep, unfortunately any editing of the viewer app results in this crash after a few seconds:

@StevenClontz ➜ /workspaces/web (jcd/codespace-dev) $ pnpm run --filter viewer dev

> @pi-base/viewer@1.0.0 dev /workspaces/web/packages/viewer
> rollup -c -w

[rollup-plugin-svelte] Forcing `"compilerOptions.css": false` because "emitCss" was truthy.
rollup v3.18.0
bundles src/main.ts → public/build/bundle.js...
LiveReload enabled
(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
(!) Plugin svelte: 'rawFormula' is not defined
src/components/Home.svelte
104:   </ul>
105: </main>
106: <Cite title='Search for "{$rawFormula}"'/>
                               ^
107: 
(!) Plugin svelte: A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
src/components/Search/Examples.svelte
16:   <article>
17:     <h5>{label}</h5>
18:     <pre class="example" on:click={() => select(search)}>{search}</pre>
        ^
19:   </article>
20: {/each}
src/components/Shared/Formula/Input/Suggestions.svelte
 8: <ul class="list-group suggestions">
 9:   {#each suggestions as property, i (property.id)}
10:     <li
        ^
11:       class="list-group-item {i === selected ? 'active' : ''}"
12:       on:mouseover={() => onHover(i)}
(!) Plugin svelte: A11y: on:mouseover must be accompanied by on:focus
src/components/Shared/Formula/Input/Suggestions.svelte
 8: <ul class="list-group suggestions">
 9:   {#each suggestions as property, i (property.id)}
10:     <li
        ^
11:       class="list-group-item {i === selected ? 'active' : ''}"
12:       on:mouseover={() => onHover(i)}
(!) Circular dependencies
src/components/Shared/Formula.svelte -> src/components/Shared/Formula/Compound.svelte -> src/components/Shared/Formula.svelte
src/components/Traits/index.ts -> src/components/Traits/Related.svelte -> src/components/Traits/index.ts
src/components/Traits/index.ts -> src/components/Traits/Show.svelte -> src/components/Traits/Proof.svelte -> src/components/Theorems/index.ts -> src/components/Theorems/Show.svelte -> src/components/Theorems/Converse.svelte -> src/components/Traits/index.ts
(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
katex/dist/katex.min.css (imported by "src/components/App.svelte")
created public/build/bundle.js in 17.7s

[2023-05-03 15:56:57] waiting for changes...
bundles src/main.ts → public/build/bundle.js...
(!) Circular dependencies
src/components/Shared/Formula.svelte -> src/components/Shared/Formula/Compound.svelte -> src/components/Shared/Formula.svelte
src/components/Traits/index.ts -> src/components/Traits/Related.svelte -> src/components/Traits/index.ts
src/components/Traits/index.ts -> src/components/Traits/Show.svelte -> src/components/Traits/Proof.svelte -> src/components/Theorems/index.ts -> src/components/Theorems/Show.svelte -> src/components/Theorems/Converse.svelte -> src/components/Traits/index.ts
(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
created public/build/bundle.js in 6.5s

[2023-05-03 15:57:49] waiting for changes...
bundles src/main.ts → public/build/bundle.js...
Killed
/workspaces/web/packages/viewer:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @pi-base/viewer@1.0.0 dev: `rollup -c -w`
Exit status 137

@StevenClontz
Copy link
Member

Apologies for the citation feature commit - I probably should have pushed it to a different PR, but that was my kicking of the tires so to speak. :-)

@jamesdabbs
Copy link
Member Author

#28 may help some with this, but it looks like there's some sort of memory leak in rollup --compile --watch. Things seem stable over time, but we leak some memory each time there's a code change / bundle rebuild. Investigating now. (Upgrading the codespace machine type is an okayish workaround for the moment.)

and clean out some cruft from the boilerplate rollup config
@jamesdabbs jamesdabbs merged commit a69804a into main May 7, 2023
@jamesdabbs jamesdabbs deleted the jcd/codespace-dev branch May 7, 2023 01:53
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.

2 participants