Skip to content
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

Prepare tp remove function$ #7206

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Prepare tp remove function$ #7206

merged 1 commit into from
Dec 20, 2024

Conversation

cristianoc
Copy link
Collaborator

@cristianoc cristianoc commented Dec 18, 2024

Remove explicit uses of function$ in preparation for removing the type entirely.

@cristianoc cristianoc force-pushed the remove-function$ branch 2 times, most recently from a35e183 to 74a96c9 Compare December 18, 2024 17:21
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: d862a37 Previous: e1b7fb7 Ratio
Print Napkinscript.res - time/run 82.75540905999999 ms 77.00100409999999 ms 1.07
Parse HeroGraphic.res - time/run 5.446224026666666 ms 5.13472718 ms 1.06

This comment was automatically generated by workflow using github-action-benchmark.

@cknitt
Copy link
Member

cknitt commented Dec 20, 2024

@cristianoc Tested against a real-world project.

There is an issue with %raw and %%raw. E.g.,

let isInstanceOfDate: Date.t => bool = %raw("(date) => date instanceof Date")

or

%%raw("/* eslint-disable react-hooks/exhaustive-deps */")

both result in the error

  This function has type 'a => 'b
  It only accepts 1 argument; here, it's called with more.

@cristianoc
Copy link
Collaborator Author

cristianoc commented Dec 20, 2024

...

%%raw("/* eslint-disable react-hooks/exhaustive-deps */")

There are a bunch of tests with %raw already.
Also, this seems fine from a bsc command-like invocation.
Could you clean and try see if it can be narrowed down?

@cristianoc
Copy link
Collaborator Author

Oh wait Windows was failing and I had to restart that job on CI. Perhaps you had stale CI artefacts if it was not finished yet?

@cknitt
Copy link
Member

cknitt commented Dec 20, 2024

Oh, you're totally right, sorry! I just forgot to clean before build.
So everything's fine, good to go from my point!

@@ -36,7 +36,8 @@ external a : ?low:int -> hi:int -> a
low: a -> int option [@@return undefined_to_opt]
lowSet : a -> int -> unit
*/
let h0 = a(~hi=2, ~low="x")
let h0 =
a(~hi=2, ~low="x", ...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting is weird here now, but we can investigate that later.

@@ -1822,8 +1822,14 @@ Resolved opens 2 Completion Completion
ContextPath Value[withCallback](~a)
ContextPath Value[withCallback]
Path withCallback
Found type for function int
[]
Found type for function (~b: int) => int
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct and was not found before.

@cristianoc cristianoc merged commit b2ebcc0 into master Dec 20, 2024
21 checks passed
@cristianoc cristianoc deleted the remove-function$ branch December 20, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants