error.todo-multiple-fbt-plural.tsx — react Source File
Architecture documentation for error.todo-multiple-fbt-plural.tsx, a tsx file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a445189a_4072_8194_1f06_d1b08581763e["error.todo-multiple-fbt-plural.tsx"] 2db15464_200a_540f_8671_b62de113ab09["fbt"] a445189a_4072_8194_1f06_d1b08581763e --> 2db15464_200a_540f_8671_b62de113ab09 style a445189a_4072_8194_1f06_d1b08581763e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import fbt from 'fbt';
/**
* Forget + fbt inconsistency. Evaluator errors with the following
* Found differences in evaluator results
* Non-forget (expected):
* (kind: ok) 1 rewrite to Rust · 2 months traveling
* Forget:
* (kind: ok) 1 rewrites to Rust · 2 months traveling
*
* The root issue here is that fbt:plural/enum/pronoun read `.start` and `.end` from
* babel nodes to slice into source strings for some complex dedupe logic
* (see [_getStringVariationCombinations](https://github.com/facebook/fbt/blob/main/packages/babel-plugin-fbt/src/JSFbtBuilder.js#L297))
*
*
* Since Forget does not add `.start` and `.end` for babel nodes it synthesizes,
* [getRawSource](https://github.com/facebook/fbt/blob/main/packages/babel-plugin-fbt/src/FbtUtil.js#L666-L673)
* simply returns the whole source code string. As a result, all fbt nodes dedupe together
* and _getStringVariationCombinations ends up early exiting (before adding valid candidate values).
*
*
*
* For fbt:plural tags specifically, the `count` node require that a `.start/.end`
* (see [code in FbtPluralNode](https://github.com/facebook/fbt/blob/main/packages/babel-plugin-fbt/src/fbt-nodes/FbtPluralNode.js#L87-L90))
*/
function Foo({rewrites, months}) {
return (
<fbt desc="Test fbt description">
<fbt:plural count={rewrites} name="number of rewrites" showCount="yes">
rewrite
</fbt:plural>
to Rust ·
<fbt:plural count={months} name="number of months" showCount="yes">
month
</fbt:plural>
traveling
</fbt>
);
}
export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [{rewrites: 1, months: 2}],
};
Domain
Subdomains
Functions
Dependencies
- fbt
Source
Frequently Asked Questions
What does error.todo-multiple-fbt-plural.tsx do?
error.todo-multiple-fbt-plural.tsx is a source file in the react codebase, written in tsx. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in error.todo-multiple-fbt-plural.tsx?
error.todo-multiple-fbt-plural.tsx defines 1 function(s): Foo.
What does error.todo-multiple-fbt-plural.tsx depend on?
error.todo-multiple-fbt-plural.tsx imports 1 module(s): fbt.
Where is error.todo-multiple-fbt-plural.tsx in the architecture?
error.todo-multiple-fbt-plural.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/error.todo-multiple-fbt-plural.tsx (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free