message: Fix internal state history incompatiblity with variant definition.
  This modification handle the exception and use temporaly the default variant choices.
diff: @@ -214,34 +214,45 @@ export class VariantManager implements vscode.Disposable {
  get haveVariant(): boolean { return !!this.stateManager.activeVariantSettings; }
  - get activeVariantOptions(): VariantConfigurationOptions {
  - const invalid_variant = {
  - short : 'Unknown',
  - long : 'Unknwon',
  - };
  - const kws = this.stateManager.activeVariantSettings;
  - if (!kws) {
  - return invalid_variant;
  - }
  + findVariantConfigurationOptions(keywordSetting : Map<string, string>) : VariantConfigurationOptions[] | null {
  const vars = this._variants;
  if (!vars) {
  - return invalid_variant;
  + return null;
  }
  - const data = Array.from(kws.entries()).map(([ param, setting ]) => {
  - if (!vars.has(param)) {
  +
  + let detectedError : Error | undefined = undefined;
  + const data = Array.from(keywordSetting.entries()).map(([ param, setting ]): VariantConfigurationOptions => {
  + let choice : VariantConfigurationOptions = {
  + short : 'Unknown'
  + };
  +
  + if (vars.has(param)) {
  + const choices = vars.get(param) !.choices;
  + if (choices.has(setting)) {
  + choice = choices.get(setting) !;
  + } else {
  debugger;
  - throw new Error("Unexpected missing variant setting");
  + detectedError = new Error(`Missing variant choice "${param}": "${setting}" in variant definition.`);
  }
  - const choices = vars.get(param) !.choices;
  - if (!choices.has(setting)) {
  + } else {
  debugger;
  - throw new Error("Unexpected missing variant option");
  + detectedError = new Error(`Missing variant "${param}" in variant definition.`);
  }
  - return choices.get(setting) !;
  +
  + return choice;
  });
  +
  + if (detectedError)
  + {
  + throw detectedError;
  + } else {
  + return data;
  + }
  + }
  +
  + mergeVariantConfigurations( options : VariantConfigurationOptions[]) : VariantConfigurationOptions {
  const init: VariantConfigurationOptions = {short : '', long : '', settings : {}};
  - const result: VariantConfigurationOptions
  - = data.reduce((acc, el) => ({
  + return options.reduce((acc, el) => ({
  buildType : el.buildType || acc.buildType,
  generator : el.generator || acc.generator,
  linkage : el.linkage || acc.linkage,
  @@ -251,7 +262,39 @@ export class VariantManager implements vscode.Disposable {
  long : [ acc.long, el.long ].join(', '),
  }),
  init);
  - return result;
  + }
  +
  + get activeVariantOptions(): VariantConfigurationOptions {
  + const invalid_variant = {
  + short : 'Unknown',
  + long : 'Unknwon',
  + };
  + const kws = this.stateManager.activeVariantSettings;
  + if (!kws) {
  + return invalid_variant;
  + }
  + const vars = this._variants;
  + if (!vars) {
  + return invalid_variant;
  + }
  +
  + let data : VariantConfigurationOptions[] | null = null;
  + try {
  + data = this.findVariantConfigurationOptions(kws);
  + } catch (e) {
  + log.warning("Last variant selection is incompatible with present variant definition.");
  + log.warning(">> " + e.message);
  +
  + log.warning("Using default variant choices from variant definition.");
  + const defaultKws = this.findDefaultChoiceCombination();
  + data = this.findVariantConfigurationOptions(defaultKws);
  + }
  +
  + if (!data) {
  + return invalid_variant;
  + }
  +
  + return this.mergeVariantConfigurations(data);
  }
  async selectVariant() {
  