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

[TODO] nimsuggest: allow handling random files not yet known #9721

Closed

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Nov 15, 2018

/cc @Araq @PMunch @krux02

There is some support so that you can throw random .nim files which are not part of myproject at Nimsuggest too, but usually the query refer to modules/files that are part of myproject.

this wasn't true until this PR
it's a very useful feature that allows you to handle nim files not covered by your initial project.nim

  • nimsuggest can handle files not yet known
  • add refresh option
  • auto-refresh main file when unknown file is provided (given via --autoupdatedMainFile:file to make it very clear it'll be auto-updated)

note

  • my previous approach was [superseded] nimsuggest: fix nimsuggest#96 ; nimsuggest can handle files not yet known #9715 ; it was very simple (2 line change) and worked in a number of cases (and was more efficient, since it didn't require full recompilation on unknown files), but led to crashes in other cases so wasn't as robust as this PR

  • if there's a better way than updating input file (given by --autoupdatedMainFile:file) I'm happy to take suggestions; otherwise this PR works fine

nimsuggest can handle files not yet known
add refresh option
auto-refresh main file when unknown file is provided
@timotheecour timotheecour changed the title nimsuggest: fix nimsuggest#96 nimsuggest: allow handling random files not yet known Nov 15, 2018
@Araq
Copy link
Member

Araq commented Nov 15, 2018

I liked your previous solution much better and the crashes could have been fixed, I think. The ModuleGraph can have multiple entry points, in theory there is not much to it.

@Araq Araq closed this Dec 5, 2018
@timotheecour timotheecour changed the title nimsuggest: allow handling random files not yet known [TODO] nimsuggest: allow handling random files not yet known Dec 5, 2018
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.

no more projectfile.nim as argument
2 participants