Sources can share the same url but have different contents:
Dynamic code evaluation.
Impure jest transformers.
File overwritting.
This is amplified by the fact that different node processes may share the same session and each session has a unique source pool. A shared source pool was required to support instrumentation in separate process. This is the case for jest transformers (which technically is in the same process but in a different different global object).
Problem
Identifying a source from its url is not longer sufficient when dynamic sources are present.
Solution
When a source content is loaded on the frontend, we hash both the url and the content of the source to identify it on the backend. This enable support for dynamic sources. When the content is not loaded on the frontend, we use the old url-only identification which does not support dynamic sources.
Context
Sources can share the same url but have different contents:
This is amplified by the fact that different node processes may share the same session and each session has a unique source pool. A shared source pool was required to support instrumentation in separate process. This is the case for jest transformers (which technically is in the same process but in a different different global object).
Problem
Identifying a source from its url is not longer sufficient when dynamic sources are present.
Solution
When a source content is loaded on the frontend, we hash both the url and the content of the source to identify it on the backend. This enable support for dynamic sources. When the content is not loaded on the frontend, we use the old url-only identification which does not support dynamic sources.