509 _ => {
510 builder.record_error(CompilerErrorDetail {
511▶ category: ErrorCategory::Todo,
512 reason: format!(
513 "(BuildHIR::lowerMemberExpression) Handle {:?} property",
· · ·
592 _ => {
593 builder.record_error(CompilerErrorDetail {
594▶ category: ErrorCategory::Todo,
595 reason: format!(
596 "(BuildHIR::lowerMemberExpression) Handle {:?} property",
· · ·
715 ) {
716 builder.record_error(CompilerErrorDetail {
717▶ category: ErrorCategory::Todo,
718 reason: "(BuildHIR::lowerExpression) Pipe operator not supported".to_string(),
719 description: None,
· · ·
758 builder.record_error(CompilerErrorDetail {
759 reason: "Unsupported delete target".to_string(),
760▶ category: ErrorCategory::Todo,
761 loc: loc.clone(),
762 description: None,
· · ·
802 builder.record_error(CompilerErrorDetail {
803 reason: "throw expressions are not supported".to_string(),
804▶ category: ErrorCategory::Todo,
805 loc: loc.clone(),
806 description: None,
+ 41 more matches in this file
1740
1741 // Legacy signature
1742▶ let mut todo_errors: Vec<react_compiler_diagnostics::CompilerErrorDetail> =
1743 Vec::new();
1744 let legacy_effects = compute_effects_for_legacy_signature(
· · ·
1751 env,
1752 &context.function_values,
1753▶ &mut todo_errors,
1754 );
1755 // Todo errors should short-circuit (TS throws throwTodo)
· · ·
1755▶ // Todo errors should short-circuit (TS throws throwTodo)
1756 if let Some(err_detail) = todo_errors.into_iter().next() {
1757 return Err(CompilerDiagnostic::from_detail(err_detail));
· · ·
1756▶ if let Some(err_detail) = todo_errors.into_iter().next() {
1757 return Err(CompilerDiagnostic::from_detail(err_detail));
1758 }
· · ·
2587 env: &Environment,
2588 function_values: &FxHashMap<ValueId, FunctionId>,
2589▶ todo_errors: &mut Vec<react_compiler_diagnostics::CompilerErrorDetail>,
2590) -> Vec<AliasingEffect> {
2591 let return_value_reason = signature.return_value_reason.unwrap_or(ValueReason::Other);
+ 6 more matches in this file
408 }
409
410▶ /// Check if any recorded errors have Todo category.
411 /// In TS, Todo errors throw immediately via CompilerError.throwTodo().
412 pub fn has_todo_errors(&self) -> bool {
· · ·
411▶ /// In TS, Todo errors throw immediately via CompilerError.throwTodo().
412 pub fn has_todo_errors(&self) -> bool {
413 self.errors.details.iter().any(|d| match d {
· · ·
412▶ pub fn has_todo_errors(&self) -> bool {
413 self.errors.details.iter().any(|d| match d {
414 react_compiler_diagnostics::CompilerErrorOrDiagnostic::Diagnostic(d) => {
· · ·
415▶ d.category == react_compiler_diagnostics::ErrorCategory::Todo
416 }
417 react_compiler_diagnostics::CompilerErrorOrDiagnostic::ErrorDetail(d) => {
· · ·
418▶ d.category == react_compiler_diagnostics::ErrorCategory::Todo
419 }
420 })
+ 3 more matches in this file
158 }
159
160▶ // TODO: port assertConsistentIdentifiers
161 if context.debug_enabled {
162 context.log_debug(DebugLogEntry::new(
· · ·
165 ));
166 }
167▶ // TODO: port assertTerminalSuccessorsExist
168 if context.debug_enabled {
169 context.log_debug(DebugLogEntry::new(
· · ·
209 }
210
211▶ // TODO: port assertConsistentIdentifiers
212 if context.debug_enabled {
213 context.log_debug(DebugLogEntry::new(
· · ·
691 }
692
693▶ // TODO: port assertValidBlockNesting
694 if context.debug_enabled {
695 context.log_debug(DebugLogEntry::new(
· · ·
715 }
716
717▶ // TODO: port assertValidBlockNesting
718 if context.debug_enabled {
719 context.log_debug(DebugLogEntry::new(
+ 2 more matches in this file
1298 if instructions.len() != 2 {
1299 cx.record_error(CompilerErrorDetail {
1300▶ category: ErrorCategory::Todo,
1301 reason: "Support non-trivial for..in inits".to_string(),
1302 description: None,
· · ·
1375 if test_instrs.len() != 2 {
1376 cx.record_error(CompilerErrorDetail {
1377▶ category: ErrorCategory::Todo,
1378 reason: "Support non-trivial for..of inits".to_string(),
1379 description: None,
· · ·
1430 InstructionValue::StoreContext { .. } => {
1431 cx.record_error(CompilerErrorDetail {
1432▶ category: ErrorCategory::Todo,
1433 reason: format!("Support non-trivial {} inits", context_name),
1434 description: None,
· · ·
2005 let _declarator = &var_decl.declarations[0];
2006 cx.record_error(CompilerErrorDetail {
2007▶ category: ErrorCategory::Todo,
2008 reason: format!(
2009 "(CodegenReactiveFunction::codegenInstructionValue) Cannot declare variables in a value block"
· · ·
2015 expressions.push(Expression::StringLiteral(StringLiteral {
2016 base: BaseNode::typed("StringLiteral"),
2017▶ value: format!("TODO handle declaration").into(),
2018 }));
2019 }
+ 2 more matches in this file
28 RenderSetState,
29 Invariant,
30▶ Todo,
31 Syntax,
32 UnsupportedSyntax,
· · ·
55 | ErrorCategory::UnsupportedSyntax => ErrorSeverity::Warning,
56
57▶ // Todo is Hint
58 ErrorCategory::Todo => ErrorSeverity::Hint,
59
· · ·
58▶ ErrorCategory::Todo => ErrorSeverity::Hint,
59
60 // Invariant and all others are Error severity
· · ·
170 }
171
172▶ /// Create a Todo diagnostic (matches TS `CompilerError.throwTodo()`).
173 pub fn todo(reason: impl Into<String>, loc: Option<SourceLocation>) -> Self {
174 let reason = reason.into();
· · ·
173▶ pub fn todo(reason: impl Into<String>, loc: Option<SourceLocation>) -> Self {
174 let reason = reason.into();
175 let mut diag = Self::new(ErrorCategory::Todo, reason.clone(), None);
+ 5 more matches in this file
255}
256
257▶/// Record the TS-faithful Todo for an unsupported assignment-target wrapper
258/// node, mirroring the TypeScript `FindContextIdentifiers` pass. TS throws
259/// immediately (CompilerError.throwTodo in handleAssignment's default case),
· · ·
259▶/// immediately (CompilerError.throwTodo in handleAssignment's default case),
260/// aborting before BuildHIR ever runs or logs, so this must return Err rather
261/// than record-and-continue: otherwise Rust emits HIR debug entries for a
· · ·
269 let mut err = CompilerError::new();
270 err.push_error_detail(CompilerErrorDetail {
271▶ category: ErrorCategory::Todo,
272 reason: format!(
273 "[FindContextIdentifiers] Cannot handle Object destructuring assignment target {type_name}"
137 env.record_diagnostic(
138 CompilerDiagnostic::new(
139▶ ErrorCategory::Todo,
140 "Important source location missing in generated code",
141 Some(format!(
· · ·
165 env.record_diagnostic(
166 CompilerDiagnostic::new(
167▶ ErrorCategory::Todo,
168 "Important source location has wrong node type in generated code",
169 Some(format!(
807 .or_else(|| block.terminal.loc().copied());
808 self.env.record_error(CompilerErrorDetail {
809▶ category: ErrorCategory::Todo,
810 reason: "Support functions with unreachable code that may contain hoisted declarations".to_string(),
811 description: None,
· · ·
880 .or_else(|| loc.clone());
881 self.env.record_error(CompilerErrorDetail {
882▶ category: ErrorCategory::Todo,
883 reason: "Support local variables named `fbt`".to_string(),
884 description: Some(
116 err.push_error_detail(
117 CompilerErrorDetail::new(
118▶ ErrorCategory::Todo,
119 "[PruneHoistedContexts] Rewrite hoisted function references"
120 .to_string(),
· · ·
184 err.push_error_detail(
185 CompilerErrorDetail::new(
186▶ ErrorCategory::Todo,
187 "[PruneHoistedContexts] Unexpected kind".to_string(),
188 )
146 errors.push_diagnostic(
147 CompilerDiagnostic::new(
148▶ ErrorCategory::Todo,
149 "ValidateContextVariableLValues: unhandled instruction variant",
150 None,
· · ·
209 errors.push_diagnostic(
210 CompilerDiagnostic::new(
211▶ ErrorCategory::Todo,
212 "Support destructuring of context variables",
213 None,
123 merge_consecutive_blocks(func, &mut env.functions);
124
125▶ // TODO: port assertConsistentIdentifiers(fn) and assertTerminalSuccessorsExist(fn)
126 // from TS HIR validation. These are debug assertions that verify structural
127 // invariants after the CFG cleanup helpers run.
93 };
94 return Err(CompilerDiagnostic::new(
95▶ ErrorCategory::Todo,
96 "[hoisting] EnterSSA: Expected identifier to be defined before being used",
97 Some(format!("Identifier {} is undefined", name)),
1022 "lone-surrogate-string-values",
1023 "component-in-object-method-body.flow",
1024▶ "error.todo-hoist-type-alias-before-declaration",
1025 "error.todo-round2_severity_diff",
1026 "error.todo-update-expression-context-variable-via-type-annotation",
· · ·
1025▶ "error.todo-round2_severity_diff",
1026 "error.todo-update-expression-context-variable-via-type-annotation",
1027 ];
· · ·
1026▶ "error.todo-update-expression-context-variable-via-type-annotation",
1027 ];
1028
644 ("findIndex".to_string(), find_index),
645 ("join".to_string(), join),
646▶ // TODO: rest of Array properties
647 ],
648 );
75///
76/// Fields that would require passing JS functions across the JS/Rust boundary
77▶/// are omitted with TODO comments. The Rust port uses hardcoded defaults for
78/// these (e.g., `defaultModuleTypeProvider`).
79#[derive(Debug, Clone, Serialize, Deserialize)]
· · ·
108 pub validate_exhaustive_effect_dependencies: ExhaustiveEffectDepsMode,
109
110▶ // TODO: flowTypeProvider — requires JS function callback.
111 #[serde(default = "default_true")]
112 pub enable_optional_dependencies: bool,