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 fortls to brew #196

Closed
gnikit opened this issue Sep 18, 2022 · 7 comments · Fixed by #199
Closed

add fortls to brew #196

gnikit opened this issue Sep 18, 2022 · 7 comments · Fixed by #199
Labels
enhancement New feature or request

Comments

@gnikit
Copy link
Member

gnikit commented Sep 18, 2022

No description provided.

@awvwgk
Copy link
Member

awvwgk commented Sep 18, 2022

We can submit fortran-lang/homebrew-fortran#13 to homebrew-core. Only thing needed is a proper test (--help / --version is not accepted in homebrew-core), can you post an example to start the language server and send a request, which is usable as a minimal test?

@gnikit
Copy link
Member Author

gnikit commented Sep 18, 2022

I don't think we can "test" by running the actual server because it opens (and does not close) IO streams. We can run one-off commands via the --debug_... commands

@awvwgk
Copy link
Member

awvwgk commented Sep 18, 2022

Okay, let's try and see what the homebrew maintainers say. Do you want to give it a shot?

@gnikit
Copy link
Member Author

gnikit commented Sep 18, 2022

Sure, would something like this work?

$ cat main.f90
program main
end program main
$ fortls --debug_filepath main.f90 --debug_symbols --debug_full_result

Testing "textDocument/documentSymbol" request:
  File = "main.f90"
[
  {
    "name": "main",
    "kind": 2,
    "location": {
      "uri": "main.f90",
      "range": {
        "start": {
          "line": 0,
          "character": 0
        },
        "end": {
          "line": 1,
          "character": 0
        }
      }
    }
  }
]

@awvwgk
Copy link
Member

awvwgk commented Sep 18, 2022

Do you want to give it a shot?

Just remembered that homebrew doesn't like self-submissions (see https://docs.brew.sh/Acceptable-Formulae), last time I tripped one of the rules my PR was plain rejected (LFortran, because it was beta software). I'll setup a PR later.

@gnikit
Copy link
Member Author

gnikit commented Sep 18, 2022

Another problem might be that fortls has the ability to autoupdate, you have to --disable_autoupdate to stop that
see https://docs.brew.sh/Acceptable-Formulae#we-dont-like-tools-that-upgrade-themselves

@awvwgk
Copy link
Member

awvwgk commented Sep 23, 2022

Can be closed, available now in homebrew/core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants