Skip to content

Issue with references (related #646) #649

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

Closed

Conversation

aspeddro
Copy link
Contributor

@aspeddro aspeddro commented Dec 12, 2022

The problem seems to be related to the interface file that blocks finding the references.

dune exec rescript-editor-analysis references tests/src/References.res 22 20

[
{"uri": "file://tests/src/References.res", "range": {"start": {"line": 22, "character": 19}, "end": {"line": 22, "character": 23}}},
{"uri": "file://tests/src/inner/ComponentInner.res", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}},
{"uri": "file://tests/src/inner/ComponentInner.resi", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}}
]

Note that the reference in inner/ReferencesInner.res is not found.

When I deleted inner/ReferencesInner.resi:

[
{"uri": "file://tests/src/inner/ReferencesInner.res", "range": {"start": {"line": 1, "character": 28}, "end": {"line": 1, "character": 32}}},
{"uri": "file://tests/src/References.res", "range": {"start": {"line": 22, "character": 19}, "end": {"line": 22, "character": 23}}},
{"uri": "file://tests/src/inner/ComponentInner.res", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}},
{"uri": "file://tests/src/inner/ComponentInner.resi", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}}
]

@cristianoc
Copy link
Collaborator

@aspeddro references were only looking in one file. Now I've added a commit so they look in both .res and .resi so the missing ones should be found now.

@cristianoc
Copy link
Collaborator

@aspeddro if you rebase on master this should be ready to go.

@aspeddro aspeddro force-pushed the refs_with_interface_aspeddro branch from dfb65b6 to b4788a4 Compare December 13, 2022 17:54
@aspeddro aspeddro closed this Dec 13, 2022
@cristianoc
Copy link
Collaborator

@aspeddro clean rebase here: #651

@aspeddro aspeddro deleted the refs_with_interface_aspeddro branch December 19, 2022 17:26
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