Bug #1892

Do not silently ignore undefined variables

Added by J. Moringen almost 10 years ago. Updated over 8 years ago.

Status:ResolvedStart date:05/28/2014
Priority:HighDue date:
Assignee:J. Moringen% Done:

100%

Category:Processing Model
Target version:0.5

Description

Downstream Report

See http://opensource.cit-ec.de/issues/261.

Implication

In case you use a non-existing variable inside the shell.command variable of freestlye projects, a job is generated but without any build step and no warning is issued.


Related issues

Duplicated by Automated Build Generator - Bug #1916: Referencing a non-existing variable in frestyle shell.com... Rejected 07/15/2014

Associated revisions

Revision 1c263d35
Added by J. Moringen over 8 years ago

Accessing undefined variables signals an error in src/project/*.lisp

fixes #1892

  • src/project/protocol.lisp (lookup): added if-undefined keyword
    parameter; adapted documentation string
    (setf lookup): similar
    (value): added optional default parameter
    (lookup t t): accept but ignore if-undefined keyword argument
    (lookup :around t t): accept and process if-undefined keyword argument
    (value t t): accept and process optional default argument
    (platform-requires t cons): supply default value to `value' call
    instead of ignoring errors
  • src/project/mixins.lisp (header): updated copyright
    (instantiate? conditional-mixin t): supply default value to `value'
    call instead of ignoring errors
    (setf lookup t direct-variables-mixin t): accept but ignore
    if-undefined keyword argument
  • src/project/aspect.lisp (make-aspect-class-form): supply default value
    in `value' call
  • src/project/aspects.lisp
    (builder-constraints aspect-builder-defining-mixin t): similar
    (define-aspect shell): shell.command must be defined but may be nil
  • src/project/classes-spec.lisp
    (shared-initialize :after version-spec t): likewise
    (requires version-spec): likewise
    (provides version-spec): likewise
    (check-access version-spec t): likewise
  • src/project/classes-model.lisp (add-dependencies! job job-spec):
    likewise
    (deploy job): likewise
    (deploy-dependencies job): likewise
  • src/project/json.lisp (load-project-spec/json-1): initialize name slot
    of the version-spec early to allow early access to the direct
    variables of the object
  • src/commandline-interface/main.lisp (analyze-project): supply default
    value to `value' call instead of ignoring errors
    (load-projects/versioned): likewise
    (configure-jobs): likewise
    (configure-distribution): likewise

History

#1 Updated by J. Moringen almost 10 years ago

  • Duplicated by Bug #1916: Referencing a non-existing variable in frestyle shell.command results in no build step added

#2 Updated by J. Moringen almost 10 years ago

  • Description updated (diff)

#3 Updated by J. Moringen over 9 years ago

  • Target version changed from 0.3 to 0.4

#4 Updated by J. Moringen about 9 years ago

  • Target version changed from 0.4 to 0.5

#5 Updated by R. Haschke about 9 years ago

This is a really annoying problem, because you only know about a stupid typo in a variable name, if the jenkins job fails after hours of compiling...
Is it such a big deal to add an error message in the build-generator, if a variable is undefined?

Also some basic syntax errors are silently ignored, e.g. missing a closing bracket: "${var"
Please fix asap.

#6 Updated by J. Moringen about 9 years ago

  • Priority changed from Normal to High

#7 Updated by J. Moringen over 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF