You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A1: when nim c -cache foo.nim foo bar gets run, nim creates a hash string hashid of all compiler flags (including cmd line ones and implicit ones from nim.cfg, config.nims, but excluding program arguments given after foo.nim, these are not cached so we can rerun with different such arguments)
... etc
# then see if hash exists otherwise create new one and garbage collect via LRU to keep disk usage low
this prevents nim c -d:foo --stacktrace:on bar.nim to invalidate what was cached by nim c -d:baz bar.nim for example; both are kept, until garbage collection kicks in
also I'd prefer this cache to be triggered by a separate --cache flag, not by the existing -r flag, for several reasons:
separation of concerns
the new -r (as shown above) is still too optimistic, and using nim c -r -f is not equivalent to the old nim c -r since -f will do more work
IMHO the new better run behavior with
nim c -r
feature is too optimistic now.For example there is no recompile when I change from
-d:debug
to-d:release
or when I change the compiler or cpu target or compiler parameters.I would suggest that these parameters should be tracked too.
The text was updated successfully, but these errors were encountered: