Page MenuHomeFreeBSD

[NEW PORT] devel/janet-lsp
ClosedPublic

Authored by dave_freedave.net on Mon, Dec 15, 4:55 PM.
Tags
None
Referenced Files
F139831626: D54238.id.diff
Tue, Dec 16, 8:08 PM
F139816505: D54238.diff
Tue, Dec 16, 3:08 PM
F139810220: D54238.id168079.diff
Tue, Dec 16, 12:58 PM
F139807737: D54238.diff
Tue, Dec 16, 12:02 PM
F139798218: D54238.diff
Tue, Dec 16, 8:52 AM
Unknown Object (File)
Mon, Dec 15, 5:21 PM
Restricted File
Mon, Dec 15, 4:57 PM
Subscribers
None

Details

Summary

This is adding another LSP to the ports for lang/janet.

NOTE: lang/jpm probably should have a runtime dependency on janet (and git), see review D54185. If that happens the dependency is not required here. jpm(1) extensively uses git, but the makefile intentionally uses commands that do not. You can even set --gitpath=/usr/bin/true to be absolutely sure. I know that because I couldn't figure out why the build failed in poudriere(8) trying a git rev-parse and it took me quite a while to realize that came from janet-lsp code.
Test Plan

Build and run in stable/14, stable/15, and current. The source for janet-lsp itself is a good project to try and verify with.

make test also passes.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dave_freedave.net created this revision.

{F139748281}
poudriere-testport(8) output, were it not for this I would have missed the git rev-parse in the janet-lsp code!

dave_freedave.net retitled this revision from [NEW PORT} devel/janet-lsp to [NEW PORT] devel/janet-lsp.Mon, Dec 15, 5:51 PM
dave_freedave.net edited the test plan for this revision. (Show Details)
devel/janet-lsp/Makefile
16

Does it need a RUN_DEPENDS on janet in your opinion?

44

Generally we would not indent the .for like that in a do-* target.

45

jpm should be called with its absolute path, based on ${LOCALBASE}.

devel/janet-lsp/pkg-descr
2

You probably want a full sentence here, not a clause. Only COMMENT has weird grammatic restrictions.

dave_freedave.net added inline comments.
devel/janet-lsp/Makefile
16

One of the very cool things about Janet is its deployment story. It can build to a "binscript" like jpm(1) which is similar to how Python would install. Or, like here, it can build to a static executable similar to golang.

I chose a static executable, but not just for convenience. This uses a non-released version of the "cmd" library. If I made it a binscript and some other janet port comes along that wants an official "cmd" they would conflict. So in this configuration it does not need RUN_DEPENDS.

dave_freedave.net marked an inline comment as done.

Address review comments:

  • place .for at line beginning.
  • use LOCALBASE to invoke jpm.
  • update pkg-descr

rechecked portlint -A, portfmt --strict, and rebuilt with poudriere testport.

dave_freedave.net added inline comments.
devel/janet-lsp/pkg-descr
2

Its still terse, but this is all it does. It may not have all the LSP features but it is still usefull.

This revision was not accepted when it landed; it landed in state Needs Review.Tue, Dec 16, 3:41 PM
Closed by commit R11:cfcfb64aa315: devel/janet-lsp: Add port (authored by dave_freedave.net, committed by adamw). · Explain Why
This revision was automatically updated to reflect the committed changes.

Great work on this! I made two [edit: counting is hard] small changes:

  • Added a space after && in do-build:.
  • Removed the comment about appeasing portlint. I personally loved it and thought it was a great way to pet the portlint, but it doesn't belong in production. I'd much rather that we all ignore unnecessary warnings, rather than alter ports in weird ways to silence it.
  • Broke a long line in do-install:.

I'm thrilled to see more LSPs! I've been intending to make a port for npm @tailwindcss/language-server for a while now. There are lots of great LSPs out there, especially those in nvim-lspconfig, and we have packages for only a handful of them.