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

Upgrade jlpm cmd to yarn 3.x #10929

Closed
wants to merge 50 commits into from

Conversation

telamonian
Copy link
Member

I followed the migration guide, and suprisingly it mostly seems to work. Needs way more testing/poking at

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@jtpio
Copy link
Member

jtpio commented Aug 28, 2021

Thanks for starting this!

Looks like there are a couple of conflicts to fix for the CI to be triggered.

@telamonian
Copy link
Member Author

up to 42/63 checks passing as of 4388e02. Woo!

@blink1073
Copy link
Member

Needs another rebase from #10796

@telamonian
Copy link
Member Author

Needs another rebase from #10796

that's gonna happen a lot. Both package.json and yarn.lock underwent large scale formatting changes, so any other PR that touches either of those is going to trigger the need for yet another rebase (YAR?)

@blink1073
Copy link
Member

YAR indeed. Happy to merge this sooner than later to avoid the churn

@telamonian
Copy link
Member Author

@blink1073 There's still a couple of chewy issues that probably boil down to pathing but aren't obvious how to fix:

  1. win and mac tests fail at first run of ensure-buildutils.js (which happens as part of pip install), while linux tests run ensure-buildutils.js just fine
  • specifically, the first call to npm run build in the buildutils pkg (where the relevant script is "build": "tsc") fails on win and mac
  • error:
           ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDERR sh: tsc: command not found
    
  1. the "dynamic" installation of playwright that happens as part of browser_check.py is no longer producing a functional install
  • the existing code for this is here:
    async def run_browser(url):
    """Run the browser test and return an exit code.
    """
    target = osp.join(get_app_dir(), 'browser_test')
    if not osp.exists(osp.join(target, 'node_modules')):
    if not osp.exists(target):
    os.makedirs(osp.join(target))
    await run_async_process(["jlpm", "init", "-y"], cwd=target)
    await run_async_process(["jlpm", "add", "playwright@^1.9.2"], cwd=target)
    shutil.copy(osp.join(here, 'browser-test.js'), osp.join(target, 'browser-test.js'))
    await run_async_process(["node", "browser-test.js", url], cwd=target)
  • running a browser check will eventually result in:
    Error: Cannot find module 'playwright'`
    

which is raised from a require('playwright'); call in browser_check.js

@blink1073
Copy link
Member

ACK, I can take a look but probably not until Tuesday

@telamonian
Copy link
Member Author

I seem to have been able to fix the tsc bug by changing various scripts such as "build": "tsc" to "build": "yarn run tsc". Similarly, I was able to fix the browser_check.py bug by changing the subprocess call from node ... to jlpm node ...:

await run_async_process(["jlpm", "node", "browser-test.js", url], cwd=target) 

@telamonian
Copy link
Member Author

I've solved the issues above, but I've run into another major snag: jupyter lab build hangs the CI. It'll run for 30+ minutes and do nothing. I've tried adding the --minimize=False flag and a bunch of other tweaks, but it just doesn't work.

On the other hand, jupyter lab build runs just fine locally. Somehow it seems to be panicking the CI container

- yarn v2.x+ complains about projects in the repo tree that aren't listed in the workspaces of `repo-top`
- also alphabetized the tests in `ci_scripts.sh`
… `examples`

- done to fix `examples` CI for yarn v2.x+
- fixes an issue on Windows CI (yarn v2.x+ sets `enableInlineBuilds: false` automatically in CI envs) with a unicode heart emoji that `yjs` tries to print to stdout on build
- propagated existing fix from linuxtests to remaining CI
…age.json` outside of `packages/*`

- replaces all uses of `yarn` and `npm` with `jlpm` in those `package.json` scripts
@jtpio
Copy link
Member

jtpio commented Oct 19, 2021

I've solved the issues above, but I've run into another major snag: jupyter lab build hangs the CI. It'll run for 30+ minutes and do nothing. I've tried adding the --minimize=False flag and a bunch of other tweaks, but it just doesn't work.

Does it give more information with --debug?

@blink1073 blink1073 removed their request for review August 29, 2022 21:42
@jtpio jtpio mentioned this pull request Dec 7, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants