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 compilers to roadmap #191

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add compilers to roadmap #191

wants to merge 3 commits into from

Conversation

certik
Copy link
Member

@certik certik commented Oct 14, 2022

No description provided.

@certik certik requested a review from gnikit October 14, 2022 22:03
@gnikit
Copy link
Member

gnikit commented Oct 14, 2022

#build_preview

@github-actions
Copy link

This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/191

source/roadmap.md Outdated Show resolved Hide resolved
Co-authored-by: Zachary Moon <zmoon92@gmail.com>
* LFortran: https://lfortran.org/
* Flang: https://flang.llvm.org/docs/
* GFortran: https://gcc.gnu.org/wiki/GFortran

Copy link
Member

@gnikit gnikit Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider adding the actual projects and deliverables we have in mind for these (at least for LFortran which you control):

https://github.com/fortran-lang/fortran-lang.org/wiki/GSoC-2022-Project-ideas#language-server
https://github.com/fortran-lang/fortran-lang.org/wiki/GSoC-2022-Project-ideas#parser--asr-for-f2py

For the LSP stuff I would add some summaries from the discussion with the vscode-cpptools devs and email conversations. I will dig them up at a later point

Suggested change
### LFortran: Language Server
This project would be used to first serialize the ASR and then use it within a language server.
- Lfortran would need to create a copy of the LSP types, see example in [clangd:Protocol.h](https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/Protocol.h).
- Use a serialization library like [RapidJSON](https://github.com/Tencent/rapidjson/) to send and receive the LSP requests/responses.
- Use an RPC communication library either in TypeScript or Python to launch an instance of the language server. For example messages received _from C++_ will be `JSON.parse(yourResponse)` into Typescript JSON, and then converted to RPC with the node module `vscode-jsonrpc`. Similarly, requests to C++ will be de-RPC'd and parsed into the server via the IO buffer, in C++ then cast the JSON into LSP types found in Protocol.h
- Add option in [Modern Fortran](https://github.com/fortran-lang/vscode-fortran-support) for VS Code (vscode-fortran-support) to integrate with the LFortran Language Server for easy usage and development, see GitHb issue [vscode-fortran-support/630](https://github.com/fortran-lang/vscode-fortran-support/issues/630)
**Expected outcomes:** LFortran can be used as a Fortran language server that can be used in other software such as source code editors and IDEs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@certik wanna have a look and tell me if I forgot something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a design discussion.

I would not recommend parsing the f2py output, because it means supporting that syntax, which complicates maintenance. For f2py's application, I think it's better to just parse Fortran itself, and possibly annotate with comments, both of which we can parse.

Also adding ASR nodes must be done carefully. We try avoiding adding nodes which are only used by one tool, as opposed to all of Fortran (or other languages).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try to write down a roadmap, for the next half a year, which effectively is to compile "fpm".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the F2PY section if that makes things simpler and then iterate on the roadmap at a later point. I simply gathered the descriptions of the GSoC projects that had not been completed in 2022

@awvwgk awvwgk added the section: roadmap Relevant for the community roadmap label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
section: roadmap Relevant for the community roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants