Giter VIP home page Giter VIP logo

Comments (15)

gelin avatar gelin commented on September 2, 2024 2
+-------------------------------------------------+
|                                                 |
|      Hello, this is Flipper team speaking!      |
|                                                 |
|       We've migrated to new build system        |
|          It's nice and based on scons           |
...

😢

from flipperzero-firmware.

reendael avatar reendael commented on September 2, 2024

The latest version of CLion (2020.2) introduces proper support for makefile-based projects and removes the necessity to use CMake to unlock the power features of the IDE. CLion seems to process the current repo out of the box (albeit I have the toolchain config already set up), code navigation and insights work very well. When the development hardware becomes available, setting up remote debugging with OpenOCD should either be automatic or pretty easy to set up.

Having said that, switching to CMake at this point when the repo is malleable is also an option.

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

Can CLion call external script (likedocker-compose) to build project?

from flipperzero-firmware.

hp197 avatar hp197 commented on September 2, 2024

Can CLion call external script (likedocker-compose) to build project?

Yes, it can call external scripts, but there is no real integration yet for docker with clion (real integration is on the roadmap).
Currently what you need to do is run a pre build script to launch a docker container and then deploy/build your code remotely over ssh in that docker container.

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

It will be great to add CLion/Idea integration if it don't require massive changing project structure and build system.

from flipperzero-firmware.

neshkeev avatar neshkeev commented on September 2, 2024

How about creating a Language Server Protocol (LSP) so users can connect to it from any editor/IDE they want?

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

How about creating a Language Server Protocol (LSP) so users can connect to it from any editor/IDE they want?

Interesting idea, I never use it before. We must start LSP server inside docker and IDE can connect to it?

from flipperzero-firmware.

neshkeev avatar neshkeev commented on September 2, 2024

We must start LSP server inside docker and IDE can connect to it?

LSP is a protocol, which means that if a client implements the protocol, it can work with any LSP server it wants to bring the IDE like experience into an editor/IDE, like autocomplete, navigation, errors, etc. The client usually is implemented as a plugin. I believe that the server can't be inside of a docker container, because it needs to have access to the file system to read a project's files. It can be just a process and a client can start/stop/restart an LSP server. Needless to say that each language should implement its own LSP server. So we will need to implement one, and any editor with an LSP plugin can work with it.

All the popular text editors/IDEs should already have a plugin that implements a client for LSP in their plugin repositories.

I used it with emacs + Rust LSP and vscode + Scala 3 LSP. No special plugins for a client were necessary, it was just a generic LSP client. The LSP servers fail sometimes and all the IDE-like features stopped working, I had to restart the server to get them back to work (which was annoying).

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

believe that the server can't be inside of a docker container, because it needs to have access to the file system to read a project's files.

But we have project dir mounted into container for build. I prefer to run server in docker because user shouldn't run something on its machine and shouldn't install something.

Is there a ready for use LSP servers exist?

from flipperzero-firmware.

nikita-b avatar nikita-b commented on September 2, 2024

Can CLion call external script (likedocker-compose) to build project?

Yes, it can call external scripts, but there is no real integration yet for docker with clion (real integration is on the roadmap).
Currently what you need to do is run a pre build script to launch a docker container and then deploy/build your code remotely over ssh in that docker container.

But IDE will not see libraries, compilers and so on if I understand correctly.

If we want to use SSH, maybe sshfs will be helpful: https://github.com/libfuse/sshfs
(Windows version: https://github.com/billziss-gh/sshfs-win)

Or maybe we just can mount directory to host?
For example, we have two directories /source /source-tmp and script prepare_enviroment.(sh\py).

  1. Run script
  2. Script copy files from /source to /source-tmp
  3. Run container that mount directory from container to /source
  4. Copy files from /source-tmp to /source
  5. ...
  6. Profit!

Also, Remote Development feature looks really promising: https://blog.jetbrains.com/clion/2018/09/initial-remote-dev-support-clion/#remote_development_what_can_i_do
(Maybe you mean exactly that and I just didn't understand)

from flipperzero-firmware.

neshkeev avatar neshkeev commented on September 2, 2024

But we have project dir mounted into container for build.

Mounting a project's directory into a docker container should work. The start command for the container becomes more complicated and that's it.

Is there a ready for use LSP servers exist?

There are plenty of LSP implementations, most of them are open source, we can fork one so we don't need to build everything from ground up. You might be interested in rust, for sublime you can use this plugin

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

But IDE will not see libraries, compilers and so on if I understand correctly.

why? You can start docker by docker-compose up -d && docker-compose exec dev bash right now and get full environment with compilers, tools and project source mounted to /project.

Did I understand correctly that LSP is the alternative to SSH-into-container and remote developement?
I have the following idea of how it should work:

  • user start docker container by docker-compose up -d
  • LSP server starts at container startup
  • user install LSP plugin for his editor and specify port that container is exposed
  • ???
  • PROFIT111

What about debugging features integration?

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

@neshkeev are you ready to integrate LSP into our image?

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

Look at VSCode + docker integration: https://github.com/MuratovAS/VScode_Docker_Stm32

from flipperzero-firmware.

glitchcore avatar glitchcore commented on September 2, 2024

Everyone feel good with current environment? What IDE are you using?

If this issue makes no sense, I will close it after 2 oct 14:00 UTC.

from flipperzero-firmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.