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

[Suggestion] Why no mention of Cadence prettier tool? #257

Closed
bartolomej opened this issue Dec 18, 2023 · 2 comments
Closed

[Suggestion] Why no mention of Cadence prettier tool? #257

bartolomej opened this issue Dec 18, 2023 · 2 comments
Labels
Bug The issue represents a bug, malfunction, regression Feedback

Comments

@bartolomej
Copy link

bartolomej commented Dec 18, 2023

I was searching if there are any existing code formatting tools for Cadence, so I figured this repo is the one where such a tool would probably live.

That wasn't the case, so after some more searching I found that the current prettier tool lives here atm: https://github.com/turbolent/prettier

Should we at least mention or link to that repo within this repo's README file to make it easier to discover?

But maybe that tool isn't "production ready" yet and there is still more work to be done before making it available to Cadence users (based on onflow/cadence#209).

@bartolomej bartolomej added Bug The issue represents a bug, malfunction, regression Feedback labels Dec 18, 2023
@turbolent
Copy link
Member

Sorry for the confusion here: Though the code formatting functionality is being developed in the Cadence codebase / repository, there's no tool for it yet that a developer could use to format their Cadence code.

https://github.com/turbolent/prettier is a Go library for formatting, it is not a tool, it is only a building block that is used in Cadence to implement the code formatting functionality.

The closest to a tool we have to try out the code formatting functionality is the internal https://github.com/onflow/cadence/tree/master/tools/pretty. As the README says, for now it is just there to assist contributors working on the implementation of the Cadence code formatter, it is not meant for Cadence developers. However, once the code formatting functionality is complete, we can take this internal tool, move it into this repo, and turn it into something a typical Cadence developer could use, and finally integrate it into the CLI and other tools like the language server and VS Code extension.

@bartolomej
Copy link
Author

Hey, no worries, this just confused me in the past when I was looking for a formatter when developing with Cadence. Now I can hopefully help with building the production-ready formatter tool myself (onflow/developer-grants#266), so I think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The issue represents a bug, malfunction, regression Feedback
Projects
None yet
Development

No branches or pull requests

2 participants