syberia / modeling.sy

The core modeling Syberia engine
MIT License
4 stars 1 forks source link

Unhelpful crash on trying to re-run a never before defined stage #18

Open peterhurford opened 8 years ago

peterhurford commented 8 years ago

If you (a) run the entire model and then (b) define a new stage and then (c) try to run that stage, you get this very unhelpful error:

> run("imsurvey", "analyze/involved_local_EA x donate")
Loading model: models/dev/imsurvey
Copying cached environments...
Beginning 3. analyze stage...
  Running 10. involved_local_EA x donate...
Error: is.environment(to) && is.environment(from) is not TRUE
In environment imports:Ramd: run("imsurvey", "analyze/involved_local_EA x donate")
In /Users/peterhurford/.R/.syberia/engines/github/robertzk/modeling.sy/master/config/global/modeling/run_model.R:27: invisible(director$cache_set("last_run",
    director$resource(keys[1])$run(..., verbose = verbose))[[1L]])
In package director: self$cache$set(k, v)
In package base: structure(list(value), .Names = key)
In package stagerunner: director$resource(keys[1])$run(..., verbose = verbose)
In package stagerunner: run_stage(..., remember_flag = TRUE)
In package stagerunner: stages[[stage_index]]$run(stage_key[[stage_index]], normalized = TRUE,      verbose = verbose, .depth = .depth + 1, ...)
In package stagerunner: self$.before_env(stage_index)
In package objectdiff: package_function("objectdiff", "force_push")(self$.context, current_commit)
In package objectdiff: replay(env, commit, silent = TRUE)
In package objectdiff: copy_env(env %$% env, (env %$% reference)[[reference_index]])
In package base: stopifnot(is.environment(to) && is.environment(from))
In package base: stop(sprintf(ngettext(length(r), "%s is not TRUE", "%s are not all TRUE"),      ch), call. = FALSE, domain = NA)

Error: is.environment(to) && is.environment(from) is not TRUE
robertzk commented 8 years ago

Mirroring this as a coalescing issue in stagerunner.