-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
core(tracehouse): move files to core/lib/tracehouse/ #8956
Conversation
@patrickhulce Yes! If tracium lives in Lighthouse repo (which is optimal imo) and publishes to tracium's npm, than we can just deprecate and archive the aslushnikov/tracium. Very happy this is happening! 🎉 |
offline we discussed naming this tracehouse instead. |
2f4e089
to
c8c9e72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickhulce wanna rebase into your 2 separate commits for landing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really not a fan of having 2x of a bunch of file names in our repo, where one file is just pointing at the other, and this trend seems like it's only going to continue as we want to expose more things for external use.
I don't have a great suggestion besides real some real refactors for these files, though. Any ideas?
@@ -7,7 +7,7 @@ | |||
|
|||
const Audit = require('./audit'); | |||
const NetworkRequest = require('../lib/network-request'); | |||
const {taskGroups} = require('../lib/task-groups'); | |||
const {taskGroups} = require('../lib/tracehouse/task-groups'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.js
@@ -11,7 +11,7 @@ | |||
'use strict'; | |||
|
|||
const Audit = require('./audit'); | |||
const {taskGroups} = require('../lib/task-groups'); | |||
const {taskGroups} = require('../lib/tracehouse/task-groups'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.js :)
Monorepo where we actually depend on our own |
the files would still be named the same without changes to either the lib/ or computed artifact files themselves, though? |
2ceb8e4
to
766e339
Compare
Oh, I see what you were saying now. Why don't we start naming our computed |
What's the final naming verdict? Twitter poll time? 😈 |
brendan voiced a few more things:
|
IMO tracehouse naming seems fine.
agree. i'd love this. (separate PR, natch)
aye. feels like a codesmell. dunno what we can do about it without adding too much magic.
audits could be called 'long-tasks' instead, but perhaps too late for that? the -computed fix would then disambiguate between the others..
ayup. i think patrick was waiting to do the move first, but that seems rather tempting. |
I'm not quite as concerned about this thing. One's the meat and the other is the adaptation of our meat to the ultra-LH-specific "computed artifact" concept which as long as we have generic library type things is relatively unavoidable. If
The obvious step to me here is to parallel Maybe I'm misunderstanding the primary concern here, but it sounds like these are all problems because the files have the same name?
Indeed I was, my plan for killing one of them is going to be controversial enough to warrant its own PR for discussion 😈 |
@brendankenny what do you need to see from me to get this merged? :) (if all looks good I will go ahead and re-rebase to have just the two commits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not great that we end up with a computed/trace-of-tab that's nearly empty.
I'm not quite as concerned about this thing. One's the meat and the other is the adaptation of our meat to the ultra-LH-specific "computed artifact" concept which as long as we have generic library type things is relatively unavoidable. If tracehouse were its own package on NPM we require'd in I don't think we'd be that worried about having a lightweight -computed wrapper.
But this repo is where the files live, and if you want to edit them you just want to edit them, not step through several levels of indirection, all with the same file name, because we love our directory names.
It's a definite architecture smell.
-computed
Let's just start calling them what they really are and add -factory
and tracehouse-impl
(all for a single concrete implementation!) while we're at it 😢
if all looks good I will go ahead and re-rebase to have just the two commits
The lib case is huge, so let's go for it. I'm sure @paulirish checked the unit tests look good after the move, so I'll defer to his earlier LGTM on that.
85161fe
to
b3cfcbd
Compare
Ooooooooooh if we're just making commentary on the fact that it's not ideal that our repo is organized this way, then you know I wholeheartedly agree. But you already know my thoughts on this so no need for me to get the boxing gloves out 😉 |
yay!! 🎉 What are the next steps? |
@aslushnikov here's the roadmap, probably 2 PRs away from matching current tracium :)
|
Summary
https://github.com/aslushnikov/tracium is basically a port of our files with a few things stripped out that we're encouraging external folks to use when trying to make sense of a trace. Keeping them in sync is going to be a nightmare unless we can publish from the source of truth. This is step 1 towards that goal.
lib/tracium
directorylib/tracium
to the rest of LHcc @aslushnikov
IMPORTANT FOR MERGE Before merging we want to keep at least two commits separate to preserve history, all the file moves are in
core(tracium): move files to lib/tracium/
commit which should allow us not to lose blame history, etc