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
It would be super useful if the plugin could specify a recompilation policy.
Possible useful policies I can think if could be
Always recompile
Recompile if arguments/configuration changes
Recompile if plugin defined state changes
Default rustc behavior
Either of these policies may then also apply to dependencies or the workspace.
A definition of a policy could look something like this
enumRecompilationPolicy<Plugin>{/// Recompile every time the tool is runAlways,/// Spiritually the same as `WhenStateChanges(Hash::hash)`WhenArgsChange,/// Recompile when the state changes. Change here is defined as the/// arguments and potentially external state (hence the function pointer to/// fetch external state) hashes to a new value./// /// Can also be used to only depend on a subset of the arguments.WhenStateChanges(for<'a> fn(&'aPlugin::Args) -> u64),Rustc}
Then RustcPluginArgs could have two fields for the recompilation policy for the workspace and the dependencies respectively, both of type RecompilationPolicy.
The text was updated successfully, but these errors were encountered:
JustusAdam
changed the title
Add option to control recompilation
Add options to control recompilation
Aug 12, 2023
It would be super useful if the plugin could specify a recompilation policy.
Possible useful policies I can think if could be
Either of these policies may then also apply to dependencies or the workspace.
A definition of a policy could look something like this
Then
RustcPluginArgs
could have two fields for the recompilation policy for the workspace and the dependencies respectively, both of typeRecompilationPolicy
.The text was updated successfully, but these errors were encountered: