[upgraded] bazel to latest version
Changes PlannedPublic

Authored by appsforartists on Mon, Dec 3, 6:54 PM.

Details

Summary

Trying to get yarn run bazel build //packages/core to work, so we can use the rollup_bundle and npm_package rules for packaging, and ts_devserver instead of pundle.

Diff Detail

Repository
R13 material-motion/material-motion-js
Branch
bazel (branched from develop)
Lint
Lint SkippedExcuse: wip
Unit
Unit Tests Skipped
appsforartists created this revision.Mon, Dec 3, 6:54 PM
Restricted Application added a reviewer: O2: Material Motion. · View Herald TranscriptMon, Dec 3, 6:54 PM
Restricted Application added a project: Material Motion. · View Herald Transcript
Restricted Application added a reviewer: Material Motion. · View Herald Transcript
appsforartists planned changes to this revision.Mon, Dec 3, 6:54 PM
Restricted Application failed to build Restricted Buildable!Mon, Dec 3, 6:55 PM
appsforartists updated this revision to Diff 11889.EditedMon, Dec 3, 10:01 PM

Backing up for the night.

This seems to be working, with a handful of wrinkles:

  • It complains that indefinite-observable/dist/wrapWithObserver doesn't have a default export, but the typings say it does. Running tsc on a sample project that imports wrapWithObserver works fine, as does yarn run build here.
  • It was emitting garbage for withDedupe:
dedupe({ areEqual = deepEqual: deepEqual$1 } = {}) {

I wrote a wrapper function which seemed to fix it:

import * as deepEqualImpl from 'deep-equal';

function deepEqual(a: any, b: any): boolean {
  const check: (a: any, b: any) => boolean = deepEqualImpl;
  return check(a, b);
}

but then reverting it didn't have the problem anymore, so 🤷🏻‍♂️.

  • It looks like it's completely stripping the implementation of deepEqual. We need to verify that the bundle works.
  • The MM license is duplicated a bunch in the minified bundle.
  • Licenses for the dependency libs aren't in the bundle yet.
  • @bazel/typescript is in both package.json and WORKSPACE. Can they be unified?
  • eslint is a devDependency of mocha, as are a bunch of plugins for it. One of its plugins complains that eslint is missing if I don't explicitly add it. That's weird for 2 reasons (why does it care about transitive devDependencys and why can't the devDependency see its sibling?).
  • Neither the yarn scripts nor CI has been updated to use bazel.
  • testing-utils and demos-react don't use bazel yet.
  • The dependencies are duplicated in both package.jsons. Need to figure out how to reference two yarn_install rules from one ts_library.
appsforartists planned changes to this revision.Mon, Dec 3, 10:01 PM
Restricted Application failed to build Restricted Buildable!Mon, Dec 3, 10:04 PM
appsforartists planned changes to this revision.Tue, Dec 4, 7:03 PM
Restricted Application failed to build Restricted Buildable!Tue, Dec 4, 7:05 PM