Wiki

Ticket #14 (closed enhancement: fixed)

Opened 17 years ago

Last modified 15 years ago

Add some (simple) form of exe dependency checking

Reported by: hopscc Owned by: Chuck
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Make the compiler rebuild (compile) a new .exe only if
the source file is newer than any existing .exe or the .exe does not exist.

see  Compiler Missing up to Date checking?

Attachments

min-build.patch Download (15.2 KB) - added by hopscc 15 years ago.

Change History

Changed 17 years ago by Chuck

  • owner Chuck deleted
  • status changed from new to assigned

Changed 16 years ago by hopscc

  • owner set to hopscc

Changed 16 years ago by Chuck

One of the challenges here is knowing what files went into the .exe:

cobra -c foo.cobra bar.cobra baz.cobra
foo.exe
cobra -c foo.cobra bar.cobra
# need a rebuild here because baz.cobra was left out

Changed 16 years ago by Chuck

Let me redo that example:

cobra foo.cobra bar.cobra baz.cobra -- args
cobra foo.cobra bar.cobra -- args

foo.exe cannot be reused in the second cobra call even though foo.cobra and bar.cobra have not been modified.

Btw you could probably embed the information in the assembly using attributes.

Changed 15 years ago by hopscc

Changed 15 years ago by hopscc

  • owner changed from hopscc to Chuck

Simple rebuild check, relnote and tests
Implemented initially with a cmdline switch to (choose to) enable

No embedding/checking state info for previous/changing runs
(thats what a build system (make, nant) is for)...

Since theres no intermediate form (.obj file) minimal builds arent really possible.
Whats its addressing is repeated unnecessary .exe regeneration from a repeated compile+run invocation.

( The patch is quite large since the changes touched all the back ends).

Changed 15 years ago by Chuck

  • status changed from assigned to closed
  • resolution set to fixed

Thanks for the patch. Looked like some good refactoring was there.

Since Cobra does not have a -build flag, but does have a -compile flag, I changed the name of the option to -compile-if-needed / -cif.

Also, some of the language concerning "younger" was flipped around. I fixed and switched to "newer".

Changed 15 years ago by Chuck

Note: See TracTickets for help on using tickets.