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

Add value and constructor path #1030

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

panglesd
Copy link
Collaborator

The ability to resolve those path will be useful in many render source code new features. In particular, this is a prerequisite to #976.

@panglesd panglesd added the no changelog This pull request does not need a changelog entry label Oct 27, 2023
Copy link
Collaborator

@gpetiot gpetiot left a comment

Choose a reason for hiding this comment

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

I left a few questions (and some things should be cleaned up) but otherwise it looks good to me!

src/xref2/link.ml Outdated Show resolved Hide resolved
src/xref2/tools.ml Outdated Show resolved Hide resolved
src/xref2/tools.ml Outdated Show resolved Hide resolved
let () =
(* Until those are used *)
ignore value_path;
ignore constructor_path
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it break things to modify source_info_infos like in #976, or would it allow to check more things in the tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure about the question! Initially, #976 was a single PR, but I turned it into three PRs:

So no, it won't break things to have source_infos as in #976, on the contrary that is the goal!

Copy link
Collaborator

Choose a reason for hiding this comment

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

What I meant is it could be done in this PR to avoid ignoring the new functions. And then we end up having a source_info_infos different, but could we ignore the new values when processing the source_infos later down the code or would it break something, in which case we should not modify the source_infos yet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok I think I understand your point: without test, it's harder to review and be sure the PR is correct...

The problem is that having source_info as in #976 is equivalent to merging the three PRs in one, which is back to the initial situation!

Copy link
Collaborator

@gpetiot gpetiot Oct 30, 2023

Choose a reason for hiding this comment

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

Got it, thanks!

let () =
(* Until those are used *)
ignore value_path;
ignore constructor_path
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question here, would it break things to update the source_info in unit like in #976?

@panglesd panglesd force-pushed the value-and-constructor-path branch from 448922b to 949f955 Compare October 30, 2023 07:29
@jonludlam
Copy link
Member

I'm not very convinced with all the datatype stuff; I think we've not got the best set of types here. Having said that, we're already in this situation and this PR won't make it more tricky to rip it out, and there are other PRs that depend upon this. Hence, let's figure this out later.

@jonludlam jonludlam merged commit b3eeab2 into ocaml:master Nov 7, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This pull request does not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants