Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-98

Submit is no longer respecting script ordering

XMLWordPrintable

      The Submit script is supposed to allow rules in a list of rule scripts to be installed in a specific order. The current implementation of Submit.addRulesFromFiles(List<String> fileNames) reads in the script sand then installs them in a hash map by calling addRules(HashMap<String, String> fileNameToScriptMap). This does not guarantee that the ruels form the first file are loaded before those from the second and so on. This is important because it affects the order in which side effects are introduced. The method addRules needs to be changed to take either a two List<String> arguments or a single List< Pair<String, String>>.

      Also, the method name addRules is misleading as is its javadoc. The String values in the map are whole scripts each of which may contain more than one rule. Up to now scripts have only contained rule definitions but this has always been subject to revision. They also need to be able to include directives which affect how subsequent rules are processed e.g. default helper settings, compilation options and so on. So, the method should be renamed addScripts and documented accordingly.

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: