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

Add devDeps for flow-bin and postcss #1479

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

sjd78
Copy link
Member

@sjd78 sjd78 commented Jul 12, 2021

  • Add flow-bin to enable manual flow checking. The version added is the last version used by the project. To run flow, use the command:
      yarn flow check
  • Explicitly add postcss to remove the yarn install warning about missing peer dependencies. This version was already referenced in yarn.lock so no new dependencies have been added. The error fixed is this one on a yarn install:
  warning " > [email protected]" has unmet peer dependency "postcss@^7.0.0 || ^8.0.1".

@sjd78 sjd78 added the Type: Developers only only affects developers (e.g. developer documentation bugs) label Jul 12, 2021
@sjd78 sjd78 requested review from hstastna, sgratch and rszwajko July 12, 2021 18:38
@rszwajko
Copy link
Member

@sjd78
How about using the newest version ? It seems we need to update nodejs-modules anyway (see build failure)

@rszwajko
Copy link
Member

not exactly connected with flow-bin but nice to fix (if nodejs modules will be updated):

  1. add dev dependency @babel/node to re-enable intl:xxx tasks
  2. update intl:xxx presets syntax - the one that worked for me is --presets @babel/env,@babel/flow

@sjd78
Copy link
Member Author

sjd78 commented Jul 15, 2021

not exactly connected with flow-bin but nice to fix (if nodejs modules will be updated):

  1. add dev dependency @babel/node to re-enable intl:xxx tasks

  2. update intl:xxx presets syntax - the one that worked for me is --presets @babel/env,@babel/flow

... #1485

@sjd78
Copy link
Member Author

sjd78 commented Jul 19, 2021

@sjd78
How about using the newest version ? It seems we need to update nodejs-modules anyway (see build failure)

There are some breaking changes in flow from the version used to current. Plus some of the library types referenced in flow could/will also break with upgrade without being upgraded at the same time. ImmutableJS is like that. I don't want to touch those quite yet, just turn flow back on until there is some time for #1452.

  - Add `flow-bin` to enable manual flow checking.  The version added
    is the last version used by the project.  To run flow, use the
    command:

      yarn flow check

  - Explicitly add `postcss` to remove the `yarn install` warning about
    missing peer dependencies.  This version was already referenced in
    yarn.lock so no new dependencies have been added.
@sjd78 sjd78 force-pushed the enable-flow-postcss-fix branch from dba9ea7 to 2dc3779 Compare July 21, 2021 20:45
@sjd78
Copy link
Member Author

sjd78 commented Jul 21, 2021

@sjd78
Copy link
Member Author

sjd78 commented Jul 21, 2021

ci test

Copy link
Member

@hstastna hstastna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except that after I run yarn flow check, I get the error:

$ /home/hstastna/oVirt_/ovirt-web-ui/node_modules/.bin/flow check
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/immutable/dist/immutable.js.flow:406:33

SetSeq [1] is incompatible with IndexedSeq [2].

 [2] 387│   static of<T>(...values: T[]): IndexedSeq<T>;
        :
     403│
     404│ declare class SetSeq<T> extends Seq<T,T> mixins SetIterable<T> {
     405│   static <T>(iter?: ESIterable<T>): IndexedSeq<T>;
 [1] 406│   static of<T>(...values: T[]): SetSeq<T>;
     407│ }
     408│
     409│ declare class List<T> extends IndexedCollection<T> {

@sgratch
Copy link
Member

sgratch commented Jul 28, 2021

LGTM, except that after I run yarn flow check, I get the error:

$ /home/hstastna/oVirt_/ovirt-web-ui/node_modules/.bin/flow check
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/immutable/dist/immutable.js.flow:406:33

SetSeq [1] is incompatible with IndexedSeq [2].

 [2] 387│   static of<T>(...values: T[]): IndexedSeq<T>;
        :
     403│
     404│ declare class SetSeq<T> extends Seq<T,T> mixins SetIterable<T> {
     405│   static <T>(iter?: ESIterable<T>): IndexedSeq<T>;
 [1] 406│   static of<T>(...values: T[]): SetSeq<T>;
     407│ }
     408│
     409│ declare class List<T> extends IndexedCollection<T> {

This seems related to a bug in flow definitions for Immutable.
Bumping Immutable package version seems to solve this.

@sjd78
Copy link
Member Author

sjd78 commented Jul 28, 2021

LGTM, except that after I run yarn flow check, I get the error:

$ /home/hstastna/oVirt_/ovirt-web-ui/node_modules/.bin/flow check
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/immutable/dist/immutable.js.flow:406:33

SetSeq [1] is incompatible with IndexedSeq [2].

 [2] 387│   static of<T>(...values: T[]): IndexedSeq<T>;
        :
     403│
     404│ declare class SetSeq<T> extends Seq<T,T> mixins SetIterable<T> {
     405│   static <T>(iter?: ESIterable<T>): IndexedSeq<T>;
 [1] 406│   static of<T>(...values: T[]): SetSeq<T>;
     407│ }
     408│
     409│ declare class List<T> extends IndexedCollection<T> {

This seems related to a bug in flow definitions for Immutable.
Bumping Immutable package version seems to solve this.

This is an old error that we ignored before. I'm fine with keeping it since flow type checks are purely manual/ide based right now.

From my answer to Radek's similar question before, seems risky to upgrade flow or immutable. I'd rather spend time to swap to typescript than fix flow:

There are some breaking changes in flow from the version used to current. Plus some of the library types referenced in flow could/will also break with upgrade without being upgraded at the same time. ImmutableJS is like that. I don't want to touch those quite yet, just turn flow back on until there is some time for #1452.

Copy link
Member

@sgratch sgratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sgratch sgratch merged commit 0e76af1 into oVirt:master Jul 28, 2021
@sjd78 sjd78 deleted the enable-flow-postcss-fix branch November 3, 2021 21:15
gerrit-ovirt-org pushed a commit to oVirt/ovirt-engine-nodejs-modules that referenced this pull request Nov 4, 2021
gerrit-ovirt-org pushed a commit to oVirt/ovirt-engine-nodejs-modules that referenced this pull request Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Developers only only affects developers (e.g. developer documentation bugs)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants