QtCS2017 Before Runtime discussion: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
* Warn about unnecessary copies
* Warn about unnecessary copies
* Clang can help here
* Clang can help here
=== Notes ===
* need real examples
* QtCreator supports only very basic refactoring tools
** having tools outside of QtCreator and use these tools maybe inside
* API changes need to be available by Clangtidy scripts (?)
* what about templates?
** concept
* the tools cannot fit to all cases
* this kind of tools can help to move to Qt 6(or other future versions)
* renaming methods would be easier with this kind of tools


== Make changes easy ==
== Make changes easy ==
Line 31: Line 21:
* Run refactorings overnight for expansive refactorings
* Run refactorings overnight for expansive refactorings
* Integration with the CI
* Integration with the CI
=== Notes ===
* need real examples
* QtCreator supports only very basic refactoring tools
** having tools outside of QtCreator and use these tools maybe inside
* API changes need to be available by Clangtidy scripts (?)
* what about templates?
** concept
* the tools cannot fit to all cases
* this kind of tools can help to move to Qt 6(or other future versions)
* renaming methods would be easier with this kind of tools
* mental work to remember this new name is still there
* can a tool do exchange deprecate things with the new "right" thing
** using clang "Fixit" maybe possible
** clang is here a tool and not the only compiler
** these "Fixit" information should be inside the code
*** if it is not there it will lose sync to the code

Revision as of 11:41, 9 October 2017

Make the API easy?

  • Copy on Write to avoid copies at runtime
  • Can we do it at compile time?
  • Let tools get const and references right
  • Warn about unnecessary copies
  • Clang can help here

Make changes easy

  • API changes are expensive
  • API looks outdated if not adapted to current paradigms (legacy code)
  • How can we make them easy
  • How can Clang help here

Clang Query

  • Think about it as SQL for the AST
  • Makes big changes much cheaper and secure

Immediate feedback vs overnight refactoring

  • Both are important
  • Immediate feedback reduces refactorings and reviews
  • Run refactorings overnight for expansive refactorings
  • Integration with the CI

Notes

  • need real examples
  • QtCreator supports only very basic refactoring tools
    • having tools outside of QtCreator and use these tools maybe inside
  • API changes need to be available by Clangtidy scripts (?)
  • what about templates?
    • concept
  • the tools cannot fit to all cases
  • this kind of tools can help to move to Qt 6(or other future versions)
  • renaming methods would be easier with this kind of tools
  • mental work to remember this new name is still there
  • can a tool do exchange deprecate things with the new "right" thing
    • using clang "Fixit" maybe possible
    • clang is here a tool and not the only compiler
    • these "Fixit" information should be inside the code
      • if it is not there it will lose sync to the code