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

Make logs gitignore-able #2023

Closed
Tallyb opened this issue Sep 24, 2019 · 6 comments
Closed

Make logs gitignore-able #2023

Tallyb opened this issue Sep 24, 2019 · 6 comments

Comments

@Tallyb
Copy link
Contributor

Tallyb commented Sep 24, 2019

When bit build failed, the following errors were created in the root folder with names similar to those ones:

?? report.20190924.144738.77808.0.001.json
?? report.20190924.144929.77853.0.001.json
?? report.20190924.145017.77889.0.001.json

This pattern is not explicit enough to make the files added to gitignore.

Files should end with log, so in most cases they are gitignored by default. Alternatively, they can be placed elsewhere and not in the project's root, so directory can be ignored.

@davidfirst
Copy link
Member

@Tallyb , I believe these files were not created by Bit, probably by the compiler. If so, it'd be best to move the issue to bit.envs/envs repo.

@GiladShoham
Copy link
Member

I'm pretty sure @davidfirst is right and it's not bit files.
Do you have a small repo to reproduce just to make sure?

@Tallyb
Copy link
Contributor Author

Tallyb commented Sep 25, 2019

https://docs.bit.dev/docs/tutorials/bit-vue-tutorial and start it:
-clone repo

  • add component
  • add compiler
  • run bit build. should work ok.

Go to the productList.vue file and add inside the methods (e.g. line 36) and extra } so the file is faulty.
Run bit build and you will get the log.
note that if you run the native vue build, this file is not shown.

@GiladShoham
Copy link
Member

@Tallyb I didn't got the files, but I notice few other issues:

  1. When running the native vue build (npm run build), we got a normal error:

> [email protected] build /private/tmp/bit-vue-tutorial
> vue-cli-service build


⠦  Bu 98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                                                                                                                                 1:00:26 PM

 error  in ./src/components/ProductList.vue?vue&type=script&lang=js&

Syntax Error: SyntaxError: /private/tmp/bit-vue-tutorial/src/components/ProductList.vue: Unexpected token (37:0)

  35 |       }
  36 |   }}
> 37 | }
     | ^
  38 |


 @ ./src/components/ProductList.vue?vue&type=script&lang=js& 1:0-280 1:296-299 1:301-578 1:301-578
 @ ./src/components/ProductList.vue
 @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
 @ ./src/App.vue?vue&type=script&lang=js&
 @ ./src/App.vue
 @ ./src/main.js
 @ multi ./src/main.js

while bit gives some JavaScript heap out of memory error.

  1. While debugging it, I saw that bit do accept the correct error after a second, but it keeps running for about 10 more seconds, so there is some memory leak during the process.

@imsnif
Copy link
Contributor

imsnif commented Sep 25, 2019

Hi @Tallyb - I also couldn't reproduce the log files issue (they do not appear at all for me), but what happened to @GiladShoham happened to me too. We spoke offline and found that this comes from bit having trouble serializing a circular error. Gilad is working on it.

@GiladShoham GiladShoham added this to the 14.5.0 milestone Sep 26, 2019
@GiladShoham GiladShoham self-assigned this Sep 26, 2019
GiladShoham added a commit that referenced this issue Oct 3, 2019
upgrade serialize-error ^2.1.0 -> ^5.0.0
remove deserialize-error (it's now part of serialize-error)
related to #2023
GiladShoham added a commit that referenced this issue Oct 3, 2019
* better handle external errors from compilers
* upgrade serialize-error ^2.1.0 -> ^5.0.0
* remove deserialize-error (it's now part of serialize-error)
* related to #2023
@GiladShoham
Copy link
Member

solved in 14.4.1

@GiladShoham GiladShoham modified the milestones: 14.5.0, 14.4.2 Oct 23, 2019
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