-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
9.0.8 breaks 'dep' event #1203
Comments
Looks like the 'deps' pipeline has the same problem:
gives the same output for 9.0.7 and 9.0.8. |
This is going to break watchify, too, although less catastrophically. Watchify will end up watching the non-existent |
@jwalton Thanks for the report.
#1202 is what changed. This is related to the issue I raised in #1162 -- I mentioned that with respect to watchify in browserify/watchify#160 and @zertosh said it wouldn't matter in that case, but not sure if that's exactly the same situation you're talking about. |
@zertosh said it might trip up the file system watcher, and he's right: this line is going to try to watch uber-watchify has essentially the same problem; it tries to cache files across executions, though, so it needs to check and see if the source file's timestamp has changed. Since |
@jmm If there's anything else you need from me, don't hesitate to ask. :) |
@jwalton OK, thanks. I probably won't be leading the charge on this issue, since I was already seeking clarification on how |
There's some test coverage for the dep event in test/dedupe-deps.js which is still working. It must be some secondary factor that is causing dep events not to fire. |
They are firing, it's just that the 'file' value has changed.
|
@jmm @jwalton I thought about this for a bit, played around some and came up with browserify/watchify#199. It works but I don't like the implementation. It feels fragile - like any little upstream change could break it. Any thoughts? |
@zertosh Thanks for doing that.
That's how I feel about the situation. I think it's important for the
Like you said, if the current situation is worked around in places like watchify it's going to be fragile -- maybe even breaking if and when the situation is legitimately "fixed" upstream. If there are problems with the way these props are handled in browserify and its core dependencies I think it would be ideal to fix them there, but it's not something I could undertake independently. |
I agree, and it probably sounds like something |
@terinjokes I think I get the gist of what you're saying in the sense that |
As the one who PRed the unintentional grief, let me step in. ;) For the time being, may you, please, have a look at not-yet-PRs ElNounch@f0caf5e and ElNounch/module-deps@f0e4252 ? |
@ElNounch Thanks for joining the discussion. I think it's possible that creating new props will make sense, but I don't think we're there yet. Perhaps the type and meaning of the existing props can be standardized and will do the trick. I think the behavior of those props may already be broken enough that changing it for the better in somewhat incompatible ways might be a reasonable course to take. This is what I'm thinking in broad terms (not necessarily exhaustive):
|
I think of browserify as a archiver making a browser-side filesystem, the
gives me ids |
This makes perfect sense, but if I'm writing a plugin for the archiver, I might still need to know where jquery actually came from. ;) |
Sure, that's the goal of |
@jmm I like the spec. Don't forget |
What's an example of how that property would be useful to a plugin or pipeline stream? That's quite different from how it works currently. Currently, depending on input provided to browserify and pipeline phase, If @zertosh Thanks for the feedback.
Absolutely, there's probably other props that should be documented, I was just focusing on a few of particular interest / relevance. I'm not sure any of these props can be considered truly private -- I think something needs to be said about each, if only "rows may contain this prop -- don't delete or tamper with it". As for |
@jmm I've got a non-hacky fix now 😄 However, it depends on browserify/module-deps#80, which fixes a race condition that sometimes causes "expose" to go missing (as reported by browserify/watchify#177). Edit: The fix it the same PR ref'd above browserify/watchify#199 |
I'm working on some documentation for the pipeline / row props, but in the meantime if anyone is interested I wrote a small utility to help show how rows flow through the pipeline by logging them after each pipeline phase: browserify-row-flow. Gives a quick overview of when / where rows|props are added or modified. |
Since 'dep' isn't documented in the browserify readme, maybe this was intentional, but it's causing grief for me, so I thought I'd raise it in case it wasn't. :)
In browserify 9.0.7, if I did:
then I'd get output like:
In 9.0.8, I get:
dep.file
is not actually a file here. I'm using uber-watchify, which tries tofs.statSync(dep.file)
, which is obviously going to end in tears for all concerned.The text was updated successfully, but these errors were encountered: