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

0.19 status? #33

Open
dillonkearns opened this issue Aug 29, 2018 · 6 comments
Open

0.19 status? #33

dillonkearns opened this issue Aug 29, 2018 · 6 comments

Comments

@dillonkearns
Copy link

Hello @tunguski! I discovered that your elm-ast fork addresses an issue regarding parsing comments within function bodies, so I am starting to use it in my https://github.com/dillonkearns/elm-typescript-interop package.

Since I'm starting to use this package, I would like to know what the maintenance status of this package is. The last commit was a while ago, so I'm guessing this package may be inactive.

I would love to just get a quick answer to these questions so I know how much to depend on this library:

  • Are you planning on updating this for 0.19?
  • Are you planning on keeping up on bug fixes if any come up, or is this no longer actively maintained?

Thank you!

@tunguski
Copy link
Owner

Hi @dillonkearns I'm really happy that you consider using this code!

I left it without further work because I came to conclusion that BogdanP repo has some community already and they work faster on resolving issues. I assumed they will resolve remaining issues like the one with comments and finally that I'll switch to it as well. But it seems it is still lacking basic things that are needed to correctly parse correct elm files.

So I'm willing to check how much work would it require to migrate repo to 0.19. First blocking item is replacing deprecated parser combinators library which won't be upgraded. That makes it non trivial work. Considering that I cannot give you any ETA.

If you'll find bugs in 0.18 version please create a ticket with code sample - I'll do my best to fix it.

As you probably saw, there is one nasty open issue that I did not resolve yet. Elm parser tries to be as good as possible in understanding indentations and it is quite hard to mimic this logic.

Hope this clarifies a bit current situation for this repo!

@dillonkearns
Copy link
Author

dillonkearns commented Sep 2, 2018

Hello @tunguski, thank you so much for the quick response!

I've migrated elm-typescript-interop over to use tunguski/elm-ast, and it definitely appears to be parsing correct Elm code much better than BogdanP/elm-ast was.

dillonkearns/elm-typescript-interop@551199d

I would love to be able to get behind a single elm-ast repo as a community, but unfortunately I waited quite a long time and didn't see some of these basic parsing issues get resolved. So the result was that I couldn't depend on it for elm-typescript-interop. That may change in the future, but there's no sign of that changing at the moment.

I wonder, do you think that #30 is the type of issue that won't arise if you are using elm-format? If so, it actually seems pretty reasonable to have as a requirement that users run elm-format on their code, so that issue isn't so urgent for me.

Thanks for the great work! Let me know if there's anything I can do to help out with the migration to 0.19, I know it's a huge task given the changes to the elm parser libraries!

@tunguski
Copy link
Owner

tunguski commented Sep 2, 2018

Hi @dillonkearns

I've spent some time investigating how much work would it take to migrate my elm-ast to 0.19. I've checked two options:

  • migrate to elm/parser - this is non trivial because it's api is very different than elm-community/parser-combinators which is compatible with what was used in elm-ast for parsing. There are many substantial changes required and this work will take a lot of time.
  • migrate elm-community/parser-combinators to 0.19 - as long as I did some basic migration here: https://github.com/tunguski/parser-combinators, the problem is that in 0.19 elm-lang/lazy won't have any migration path. This means that this path may be a dead end.

I had not time yet to test results of migration of https://github.com/tunguski/parser-combinators, but I'm pesimistic about it. Trying elm-test@0.19.0-beta6 on this repo failed, I did not dig into it further.

As for #30 - basic assumption I've done is that if some code works fine with Elm, it should be parsed correctly. So I'll leave the issue open to indicate that there are cases that won't be parsed. Yet you can still verify your examples and maybe it's not a blocker for your.

I'll update this thread when I'll have more knowledge.

@dillonkearns
Copy link
Author

Hi @tunguski, thank you for researching this and giving the detailed update! I appreciate you taking the time to do that.

It sounds like BogdanP/elm-ast doesn't have plans to move to Elm 0.19 as well. It seems like it might be worthwhile to build a new parsing library from scratch in Elm 0.19. It's a large project and I'm not sure if I have bandwidth to take it on, but I think that the community could benefit from it given that Elm doesn't have meta programming capabilities. So syntax parsing is an important tool for the Elm community I think.

Anyway, thanks again for your work!

@pravdomil
Copy link

pravdomil commented Jan 14, 2020

@dillonkearns have you consider https://package.elm-lang.org/packages/stil4m/elm-syntax/ ?

it supports elm 19.1 and is build on top of elm/parser

@dillonkearns
Copy link
Author

Hello @pravdomil! Yes, I'm going to give that a try when I have some time! I've got a few other open source projects that I've been working on lately so I haven't had any spare cycles for that, but it's definitely on my list 👍

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