Menu

#540 reparsing project not updating auto-generated files set after change of precompiler rules

Undefined
open
nobody
Bug_Report
2017-08-04
2017-08-02
Jannick
No

Example:

  • open project with file a.y, hence auto-generated file a.parser.cc and a.parser.hh (according to precompiler rule)
  • change the .y precompiler rule to create dependency files $file_name.parser.c and $file_name.parser.h (i.e. change of file extension), close the precompiler config dialog and save the config changes to default.conf
  • reparse the project
  • issue: set of auto-generated files not updated in project explorer frame

Workaround: close and reopen project

Discussion

  • ollydbg

    ollydbg - 2017-08-03

    The "reparse the project" context menu is a feature from "CodeCompletion plugin", it is not related to compiler plugin.

     
  • Jannick

    Jannick - 2017-08-04

    Understand.

    I think this is still a bug - or a potential enhancement at least - that the list of auto-generated files in the file explorer is not updated when the compiler dependency rules are updated.

     
  • Teodor Petrov

    Teodor Petrov - 2017-08-04

    Can you upload a sample project? And please post the exact steps needed to reproduce the problem. I have no idea where is this precompiler config dialog.

     
    • Jannick

      Jannick - 2017-08-05

      Attached a minimal compilable example requiring flex.exe:

      Example

      • open project (assuming that gcc is the associated compiler) and you see
        • mini.l - source file
        • mini.scanner.cc - autogenerated file (if using the svn11112 default precompiler defautl config)
      • compile target debug
        • precompiler mini.l > mini.scanner.cc
        • mini.scanner.cc > mini.scanner.o
        • mini.scanner.o > ....exe
      • clean target - and make sure that CB really removed mini.scanner.cc (it should usually do, but it does not for non-.c/non-.cc auto-generated files (see [tickets:#538]
      • adjust precompiler rule by replacing extension of auto-generated file from '.cc' to '.c', i.e. the precompiler should convert 'mini.l' to 'mini.scanner.c' (instead of 'mini.scanner.cc)
        • settings > compiler > tab 'Other settings' > btn 'Advanced options ...' > tab 'Commands' > select 'l' in 'Source ext'
        • window 'command line macro': replace '.cc' by '.c'
        • window 'generated files': replace '.cc' by '.c'
      • confirm with 2 x 'OK'

      Result

      • projects window: auto-generated file still shown as 'mini.scanner.cc' (although we changed it to 'mini.scanner.c' ... this is on the surface
      • compile project to test what the compiler factory knows and expects.
        • precompiler step: mini.l > mini.scanner.c (OK)
        • compiler step: mini.scanner.cc > mini.scanner.o (expected after change: mini.scanner.c > mini.scanner.o) breaks since .cc file does not exist.

      Summary

      After changing precompiler rules
      the displayed set of auto-generated files is not updated in the project view
      the compiler does acknowledge the change of the precompiler rule (supposedly since read at compile time) ...OK
      * the compiler does not internally update the auto-generated file list

       

      Related

      Tickets: #535
      Tickets: #538


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.