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

Improved output for the bit watch command #1634

Closed
odedre opened this issue May 15, 2019 · 7 comments
Closed

Improved output for the bit watch command #1634

odedre opened this issue May 15, 2019 · 7 comments

Comments

@odedre
Copy link
Member

odedre commented May 15, 2019

Description

when running bit watch on an imported component, the output isn't clear. see screenshot.

Expected Behavior

I think there should be better separation between component name and files in that component

Actual Behavior

  • it's an object of components with arrays of files
    Screen Shot 2019-05-15 at 5 52 02 PM

Steps to Reproduce the Problem

  1. import a component
  2. run bit watch
  3. see output

Specifications

  • Bit version: 14.1.0
  • Node version: 10.12.0
  • npm / yarn version: 1.15.2
  • Platform: macOs
  • Bit compiler (include version): bit.search/[email protected]
  • Bit tester (include version): bit.envs/testers/[email protected]
@itaymendel
Copy link
Contributor

I totally agree with you on this one. I think that the baseline for a proper watch output for Bit should:

  • Start with a summary of the workspace
    • Bit version
    • Node version
    • Number of components in WS (list them?)
  • For each modification:
    • List the components Bit needs to rebuild
    • For each component list the files that were modified (that caused the re-build)
  • When the build process finished running:
    • List the rebuilt components
    • For each component list the built files
    • Provide status for each component build (pass/fail)
    • If the build failed - prompt the error message

@GiladShoham
Copy link
Member

@itaymendel I don't see why bit/node version are necessary for the output.
I would start with something like:
watching X components
or

watching 
comp 1
comp 2
comp 3

about after the build process, I'm not sure if we want to aggregate errors or just show the first we got.
All the other sounds good to me

@itaymendel
Copy link
Contributor

The main reason I want versions and stuff is that usually, this command runs from another terminal, and perhaps... for some reason there's an env-var that made the version different for node or bit.

As for aggregate errors or not - I still haven't decided on how the output is structured. Trying to figure out what makes sense as an output for the command. Then we'll decide on the how it is presented :)

@GiladShoham
Copy link
Member

The main reason I want versions and stuff is that usually, this command runs from another terminal, and perhaps... for some reason there's an env-var that made the version different for node or bit.

Yes I can understand that. No problem, we can make it.

@itaymendel
Copy link
Contributor

bit binary version: <version>
node version: <version>
started watching for component changes to rebuild
running build for <component id>
      <path to dist>.js
      <path to dist>.js
running build for <component id>
      <path to dist>.js

@GiladShoham ?

@GiladShoham
Copy link
Member

@itaymendel We currently have a --verbose flag, we use for output all the files we watch.
Let's add it to the specs. (also with the names of the components)

@davidfirst
Copy link
Member

The output has been improved by the commit above. PR #1846.
The list of all components and their paths that going to be watched is printed only when --verbose is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants