You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* PoC for adding a %todo extension that warns with proper locations
* raise instead of emulating Obj.magic
* align
* use Js.Exn.raiseError and include ReScript file name + location of todo code in error thrown at runtime
* update fixtures
* change text
* fixtures
* changelog
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@
12
12
13
13
# 11.1.0-rc.8 (Unreleased)
14
14
15
+
#### :rocket: New Feature
16
+
17
+
- Add `%todo` extension for leaving implementation for later. https://github.com/rescript-lang/rescript-compiler/pull/6713
18
+
15
19
#### :bug: Bug Fix
16
20
17
21
- Improve error when using '@deriving(accessors)' on a variant with record arguments. https://github.com/rescript-lang/rescript-compiler/pull/6712
(* If you remove a warning, leave a hole in the numbering. NEVER change
91
92
the numbers of existing warnings.
@@ -151,6 +152,7 @@ let number = function
151
152
|Bs_integer_literal_overflow -> 107
152
153
|Bs_uninterpreted_delimiters_ -> 108
153
154
|Bs_toplevel_expression_unit_ -> 109
155
+
|Bs_todo_ -> 110
154
156
155
157
let last_warning_number =110
156
158
@@ -509,6 +511,11 @@ let message = function
509
511
|Other -> "yourExpression") in
510
512
Printf.sprintf "\n\n Possible solutions:\n - Assigning to a value that is then ignored: `let _ = %s`\n - Piping into the built-in ignore function to ignore the result: `%s->ignore`" helpText helpText
511
513
|_ -> "")
514
+
|Bs_todomaybe_text -> (
515
+
match maybe_text with
516
+
|None -> "Todo found."
517
+
|Sometodo -> "Todo found: "^ todo
518
+
) ^"\n\n This code is not implemented yet and will crash at runtime. Make sure you implement this before running the code."
0 commit comments