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

Publishing this! #1

Open
purcell opened this issue Aug 6, 2023 · 13 comments
Open

Publishing this! #1

purcell opened this issue Aug 6, 2023 · 13 comments

Comments

@purcell
Copy link
Contributor

purcell commented Aug 6, 2023

Hi! I sat down and started writing an ocaml-ts-mode of my own for fun before thinking to search for a pre-existing one, and I found yours. You've made more progress (though I had some extra font lock rules), and it looks in pretty good shape overall, so how about we add yours to MELPA for wider use?

@purcell purcell mentioned this issue Aug 6, 2023
@dmitrig
Copy link
Owner

dmitrig commented Aug 7, 2023

Hi -- glad you found this somewhat useful!

Yes, I'd like to publish it but I'd like to find the time to really figure out how to do indentation first. Right now it sort of works but is much worse than tuareg, and I hit a bit of a wall trying replicate what tuareg does with smie.

I did see that at least one other person (who is more involved in the OCaml community than myself) might be taking a stab at a tree-sitter mode. Could be worth reaching out to see how far they got.

@purcell
Copy link
Contributor Author

purcell commented Aug 8, 2023

I dropped them an email and invited them to join forces with us.

I don't think indentation needs to be as good as tuareg in order for this to be releasable, personally. Something fairly approximate is fine initially, and in any case an increasing number of people use auto-formatters aggressively.

@nojb
Copy link

nojb commented Aug 8, 2023

Hello! Thanks for the ping.

I agree that it is better to join forces instead of having N separate half-baked TS modes. I worked a bit on the indentation part trying to replicate what https://github.com/OCamlPro/ocp-indent does (which is what I use at work), but it is far from perfect. You can see the code here: https://github.com/nojb/ocaml-ts-mode/blob/c1c36463d4db302405e792f6dbd65766ea1d1ec8/ocaml-ts-mode.el#L284-L308. Currently on holiday, but I am planning to try the mode in this repository when I get back to work next week and will report back here.

Agree with #1 (comment) that it is OK to release something that is minimally working and improve it later. Editor modes have a low barrier to entry so once it is released many people can contribute improvements to it.

@purcell
Copy link
Contributor Author

purcell commented Aug 20, 2023

Hey @nojb and @dmitrig, I wonder if I can do anything to help here. Perhaps I could grab @nojb's indent rules and add them to this version of the mode, perhaps as a separate PR, so that @dmitrig could try them out locally? Or perhaps we all think that @nojb's code might be a better starting point for a canonical ocaml-ts-mode?

@nojb
Copy link

nojb commented Aug 20, 2023

Hey @nojb and @dmitrig, I wonder if I can do anything to help here. Perhaps I could grab @nojb's indent rules and add them to this version of the mode, perhaps as a separate PR, so that @dmitrig could try them out locally? Or perhaps we all think that @nojb's code might be a better starting point for a canonical ocaml-ts-mode?

Thanks for the ping @purcell. My 2c: forget indentation in the first release (indentation is also available with external packages such as ocp-indent and ocamlformat so it is not clear a lot of people are going to be using the built-in indentation support anyway).

I can't see a lot of my code has that is not already in this package, so I think it would be OK to go ahead with a preliminary release. I am planning to delete my repository soon to avoid confusion.

@nojb
Copy link

nojb commented Aug 20, 2023

forget indentation in the first release

Alternatively, leave what has been done already in the code, but make it very clear in the release that indentation support is experimental. That way, people will not complain if it doesn't match their expectations.

@purcell
Copy link
Contributor Author

purcell commented Aug 20, 2023

Okay, so there are a couple of options I see:

  • Keep this repo in place, merge Misc tweaks #2 in preparation for packaging, and then @dmitrig can optionally add one or both of us as committers.
  • Create a new org ("ocaml-ts-emacs" perhaps) with us 3 as owners, then @dmitrig could transfer the repo there.

I might suggest the latter, but happy with whatever @dmitrig prefers.

@dmitrig
Copy link
Owner

dmitrig commented Aug 20, 2023

Thanks for following up! I should have some time to move this forward this week.

Re: what to do with indentation, I'll take a look at @nojb's code this afternoon but I think I agree now it doesn't matter much for the first release. I had started to compare indentation more systematically using the test cases in tuareg but it's still hard to say what's good enough short of matching exactly.

So right now I think my plan is to try to clean up the code in its current state and put it on melpa this week, though I may still either replace or rip out the indentation logic and put it on a separate branch. Re permissions: happy to share commit privileges, though maybe we can hold off on making an org unless there's some benefit to that I'm not seeing.

@dmitrig
Copy link
Owner

dmitrig commented Aug 20, 2023

You can see the code here: https://github.com/nojb/ocaml-ts-mode/blob/c1c36463d4db302405e792f6dbd65766ea1d1ec8/ocaml-ts-mode.el#L284-L308.

Was this deleted already? Getting a 404 @nojb

@nojb
Copy link

nojb commented Aug 20, 2023

You can see the code here: https://github.com/nojb/ocaml-ts-mode/blob/c1c36463d4db302405e792f6dbd65766ea1d1ec8/ocaml-ts-mode.el#L284-L308.

Was this deleted already? Getting a 404 @nojb

Sorry, my bad. Should be fixed.

@purcell
Copy link
Contributor Author

purcell commented Aug 20, 2023

my plan is to try to clean up the code in its current state and put it on melpa this week

Yep, just ping me and I can fast-track that part.

though maybe we can hold off on making an org unless there's some benefit to that I'm not seeing.

No particular benefit.

@purcell
Copy link
Contributor Author

purcell commented Aug 25, 2023

Hey, I think I'll probably go ahead and add this to MELPA over the weekend, since it's honestly in good shape for a preview release.

@purcell
Copy link
Contributor Author

purcell commented Aug 27, 2023

Okay, I added a MELPA recipe and it should start building there soon. :)

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

No branches or pull requests

3 participants