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

Improve UX when multiple stats-files has compilations with same hash #91

Open
lizryzhko opened this issue Jul 23, 2021 · 11 comments
Open
Labels
bug minor Low priority webpack-ui @statoscope/webpack-ui

Comments

@lizryzhko
Copy link

Describe the bug
If pass additional or multiple stats within StatoscopeWebpackPlugin or cli version, only one of the stats is available in the UI.

To Reproduce
Steps to reproduce the behavior:

  1. run npx statoscope generate --input path/to/stats1.json path/to/stats2.json --output path/to/report.html
  2. try to choose stats in the report or show diff
  3. see that only one of the stats is available

Expected behavior
Both stats1.json and stats2.json are available in the report.

Versions:

  • Node (for non-browser bug): v14.16.0
  • Browser (for browser-bug): Chrome 91.0.4472.114
  • @statoscope/cli: 5.6.2
  • @statoscope/webpack-plugin: 5.6.2
@smelukov
Copy link
Member

Thanks for the issue.
Are the input files have the same name (but in different directories)?
For example:

statoscope generate --input dir1/stats.json dir2/stats.json --output path/to/report.html

@smelukov
Copy link
Member

I've got this behavior only when the input files have the same filename 🤔

@lizryzhko
Copy link
Author

Nope, files have different names

@smelukov
Copy link
Member

Can you click the "Make report" button (on the top-right panel) please?
How many files do you see there?
It should be something like this
image

@lizryzhko
Copy link
Author

There are 2 files as expected

@smelukov
Copy link
Member

There are 2 files as expected

So you should see the "Choose stats" button
image
and the two stats on the "Diff" page
image

@lizryzhko
Copy link
Author

Nope, while there are two files on the "Make report" page, I can see only one when trying to choose stats:

image

image

image

image

@smelukov
Copy link
Member

Wow :)
That's interesting

@smelukov
Copy link
Member

I think that I need your help to deal with it :)
Can you please insert this query into the Make Report page and send me the result?
compilations.({hash})

@lizryzhko
Copy link
Author

hmm...
image
After I added some changes to my project and ran statoscope, I could see two stats in the report 👍

@smelukov
Copy link
Member

smelukov commented Jul 23, 2021

I think I've got it - the problem appears when you have two same stats, with the same compilation hash
Compilation hash changes only when a bundle changes.
So I think that there must be two stats in the list with some warn message.
I'll fix it

Again, thanks for the issue and for your help )

@smelukov smelukov added minor Low priority webpack-ui @statoscope/webpack-ui and removed need investigate labels Jul 23, 2021
@smelukov smelukov changed the title Multiple stats doesn't work Improve UX when multiple stats-files has compilations with same hash Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug minor Low priority webpack-ui @statoscope/webpack-ui
Projects
None yet
Development

No branches or pull requests

2 participants