Skip to content

Conversation

@liam923
Copy link
Contributor

@liam923 liam923 commented Jun 11, 2025

Bring Merlin up-to-speed with oxcaml version 5.2.0minus-11.

let to_unit_info name =
Some (name |>
Compilation_unit.of_string |>
Unit_info.make_dummy ~input_name:name)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this won't break anything, but using make_dummy scares me a bit. It seems like the type of thing that may cause something to break down the line. If we want to call Unit_info.make_with_known_compilation_unit, we can use config.query.filename to fill source_file.

I'm not sure about intf_or_impl - I don't know if Merlin knows that at this point (I'm not sure if Merlin decides this based on solely the filename or whether it's able to parse successfully). And I don't know that the file_prefix argument is for.

Maybe @lukemaurer can chime in on the significance of using make_dummy here, and what the deal is with file_prefix?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I wanted @lukemaurer to review this piece. It was very low confidence.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, if there's a real source file then we don't want to be using make_dummy if we can avoid it. make_with_known_compilation_unit makes a lot of sense to me. The intf_or_impl thing is annoying - wish I could remember exactly what it's used for

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I seem to have lost my permissions to push to this repo. @lukemaurer can you look at the below commit: liam923/merlin@4123c5a

Specifically, I'm not sure what to pass for the file_prefix to Unit_info.make_with_known_compilation_unit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha I've gotten my permissions back. Commit 4123c5a is pushed here now.

@liam923
Copy link
Contributor Author

liam923 commented Jun 11, 2025

@goldfirere please review the commits pushed by me

@goldfirere
Copy link
Contributor

I have reviewed through "Add new ignored flags". Just waiting on @lukemaurer at this point.

@liam923
Copy link
Contributor Author

liam923 commented Jun 18, 2025

I'm merging despite the discussion around Unit_info.make_with_known_compilation_unit being unresolved. Merlin needs to get released for minus11, and I think this is immaterial to whether Merlin will work properly for this version - that discussion is simply about avoiding future issues. I'll follow up with @lukemaurer about the usage of it.

@liam923 liam923 merged commit 989914a into main Jun 18, 2025
1 check passed
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.

4 participants