CLion and PyCharm hit 2020.2, looking for devs to stay insIDE and tackle missing standards problem • DEVCLASS – DevClass

It’s that time of year for JetBrains to update its IDE portfolio. With new Intellij IDEA and RubyMine versions already out, it was now CLion and PyCharm’s turn to make the jump to v2020.2, adding highly sought after features such as support for Makefile projects and pull request merging support to the C/C++ and Python tooling.

PyCharm, 2020.2 seems to be all about reducing the number of context switches during software development. It now, for example, has included a dedicated window to work on GitHub pull requests, so that devs have a way of reviewing, commenting on and eventually merging PRs without having to change into a browser. 

To make that process a bit easier, the PyCharm team also added functions for reviewing, and workflows for merging, rebasing and merging, or squashing and merging into the tool. Other new helpers in that area have ranged from a display of issues found during pre-commit checks along with links to resolve them when a request is reviewed. 

Looking at the IDE features, the most apparent change has been a new inspections widget which seems to have landed across the JetBrains portfolio including CLion and PyCharm. It is meant to provide users with an overview of all errors and warnings in the file they are currently working on, offering jump marks for every issue and highlighting for either syntax or other problems.

Advertisement

While Python 3.9 has not been released yet, PyCharm comes fitted with support for a couple of the anticipated features in the new language version, so that it knows, for example, how to handle generic types in standard collections or the new @expr syntax. PyCharm also comes loaded with new gutter icons and intention actions to let devs change the signature of a method or rename classes and methods throughout a project.

Users of the professional edition can make use of DataGrip’s database features, meaning they will also get to take advantage of improvements such as better JOIN completion, markings to spot boolean values set to true, and improved MongoDB and Oracle DB handling.

Moving on to CLion, its appearance on the IDE landscape has, according to C++ creator Bjarne Stroustrup, improved the tooling situation for “industrial-strength” scenarios. The current release followed this trajectory, taking a closer look at what’s most needed amongst C/C++ developers and using this information for major improvements along with some odds and sods for better code quality. 

A developer ecosystem study the company released earlier this year, for example, found some shortcomings regarding tests amongst respondents. JetBrains C++ & .NET Tools PMM Anastasia Kazakova attributed this to the amount of work needed to implement something so seemingly easy in other languages in C/C++. 

“In C++, we are lacking lots of essential things in the ecosystem,” she told DevClass in a telephone briefing. “The unit testing framework that would be a standard, the project model that would be a standard, the package manager that would be a standard. When you don’t have them, it’s really a hard task to integrate unit tests into your project.”

Of course, there are options, however, they don’t come without their own sets of challenges. “If you take a Google test, the most popular framework for now, it’s not a header only framework” she clarified. “So you have to build it together with your project. And then you come to a problem, because to build something in C++… to get it into your project, you need to build it with your project model which is not standard. We probably have like more than 10 popular ones, and you have to get it from somewhere.”

Package managers can help here, but as already mentioned, they aren’t standard either and not everyone uses one, which puts another kink in the workflow. “All these are small things”, Kazakova said, ”but they affect the whole process. So it gets you out of the flow and you don’t want to add the new test at that point anymore. You want something really simple.“

Catch2 and Doctest have moved along those lines, which is why, in order to make the process a little easier for testing enthusiasts, CLion now knows how to work with the Doctest framework, automatically detecting appropriate tests, creating run/debug configurations, and displaying results in the integrated runner. It has also included updated support for Google Test and Catch2. This mainly means that devs can make use of a macro to skip tests at runtime for the former and template tests for the latter – it should be helpful nonetheless.

The survey also revealed a high interest in Makefiles, which CLion finally learned to work with in the current release. Kazakova saw the (still in its early stages) addition as especially appealing to embedded developers, which is a CLion user group that continues to grow. She said she viewed Makefiles as “a very essential project model”. 

The IDE has also been primed for the still-to-be officially released C++20 standard, now sporting better code completion and highlighting for some key words, as well as new inspections. CLion has been designed to also help to expunge the well-known problem of dangling pointers, and is better at finding loops that are never updated and unused code. More details on the release, including debugger improvements and go to declarations can be found on the CLion blog

For those wondering about a Rust IDE, however, Kazakova had bad news. “We’re not ready to make a separate Rust IDE, I don’t think this will happen in the near future.” This is mainly down to the C++ challenger interacting so much with C++ and other languages already covered by the company’s IDEs, Kazakova confirmed.

“Rust is young, but it’s very interesting and many people in C++ who are maybe disappointed in the language proceed with Rust now. So it’s definitely a good thing for us to support it…The Rust plugin is working nicely for us.” An update for the latter is planned for next week, which Kazakova promised will have “lots of goodies” Rust aficionados can look forward to.

– Advertisement –