Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Update dependencies and compatibility tests #1341
Conversation
`yarn install` was failing with newer node versions (>=10) because the version of fsevents was too old (no precompiled binaries), and node-gyp would fail to build it. `yarn upgrade` mitigates this issue, but a change in `prettier` 1.18 (https://prettier.io/blog/2019/06/06/1.18.0.html) required `yarn format` to also be run. A missing dependency (`rollup-plugin-json`) was added to `@vue/test-utils`, as it is imported in its build script.
As mentioned in the commit message, I had to add an explicit dependency within What is unclear to me is why it wouldn't fail with the old lockfile. The package ( |
Hang on while I figure out the compat test failures. |
So the compatibility tests are out-of-date, and there is duplication in multiple places. Running them during development using Further still, there are configuration inconsistencies in The worst part, though, is that while CircleCI attempts to define its own versions to test against by calling @eddyerburgh is there any objection to calling I would also like to call
|
Update minor versions of running `yarn test:compat` to the latest patch revisions. Add optional argument to `yarn test:compat`, to allow running tests against arbitrary `vue` versions. Run compatibility tests in reverse order, to ensure the most relevant test failures are displayed. Run `yarn add` non-interactively, to force errors if `yarn test:compat` is passed an invalid value. Run `yarn add` without clobbering the lockfile.
OK, so since that update to I'll have to figure out what exactly is causing the compatibility failure, perhaps a specific patch was fixed on all 2.x branches except for 2.0 for some reason. I'll look into it. |
Having each compatibility test version specified in both the CI config and the package script leads to inconsistencies over time. The CI config can just use the package script.
Common build dependencies across sub-packages can get out-of-sync over time. Currently, `rollup` and plugins is used across both `test-utils` and `server-test-utils`, but different versions are specified. This requires duplicate installations, and prevents hoisting. Since `devDependencies` are not present in published packages, and since the monorepo is used exclusively for building the subpackages, it makes sense to define all build dependencies in the root package. Move all `devDependencies` in the root package to `dependencies`, to avoid unmet peer dependency errors in `yarn`: yarnpkg/yarn#5810 Update each of these dependencies to their latest version, in particular `rollup`, which has since released stable versions. See https://github.com/lerna/lerna/blob/master/doc/hoist.md#lerna-hoisting
I think I've got to the bottom of the I've done two things to address this problem:
I'm still unsure of what is causing all the test failures in the last compatibility test (Vue version |
Each compatibility test installs a legacy version of `vue`, and builds each package against this version before running the test suites. This is assumedly in error, as the only build that gets published is the one built against the dependencies in the lockfile. To properly test compatibility for consumers using older versions of `vue` to satisfy each package's peer dependency, we need to test against the build that would actually get published. The fix is to run `yarn build:test` only once, before any compatibility tests are run.
The upgrade from `rollup` beta -> stable went without breakages, so clearly we don't need to overly constrain updated dependencies using the `^` semver specifier.
The updates from 1d6950a have to be partially reverted to allow for the last compatiblity test suite to pass: `vue@2.0.8`. There is some unclear combination of dependencies that causes 80 unit test failures for only the 2.0 version of vue.
Unfortunately I was not able to get to the bottom of the failing compatibility tests, I've spent too long on it already. I don't fully understand all the pieces yet, when I do maybe I'll revisit it. I've opted to just revert most of the locked dependencies. The build system improvements and dependency simplification/hoisting is still valuable, though. |
@gkatsanos what's the merge procedure for pull requests in this project? How many reviewers are needed, and who is in charge of merging? |
Hey @vvanpo, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! |
yarn install
was failing with newer node versions (>=10) because theversion of fsevents was too old (no precompiled binaries), and node-gyp
would fail to build it.
yarn upgrade
mitigates this issue, but a changes inprettier
1.18(https://prettier.io/blog/2019/06/06/1.18.0.html) required
yarn format
to also be run.
A missing dependency (
rollup-plugin-json
) was added to@vue/test-utils
, as it is imported in its build script.