Skip to content

Commit

Permalink
Improves deepdive-compile to record and check deepdive version
Browse files Browse the repository at this point in the history
and not skip compilation when a different version is used
  • Loading branch information
netj committed Jan 24, 2017
1 parent ee6917a commit f8e97ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/app-has-nothing-to-compile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ DEEPDIVE_APP=$(find-deepdive-app)
export DEEPDIVE_APP
cd "$DEEPDIVE_APP"

# check if deepdive version has changed
deepdive-version |
diff -q "$DEEPDIVE_APP"/run/compiled/deepdive.version - || {
warning 'deepdive version updated since last `deepdive compile`'
exit 127
}

# source files to check
set -- app.ddlog deepdive.conf schema.json

Expand Down
6 changes: 6 additions & 0 deletions compiler/deepdive-compile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ PATH="$DEEPDIVE_HOME"/util/compile-config:"$PATH"
PATH="$DEEPDIVE_HOME"/util/compile-code:"$PATH"
export DEEPDIVE_ERROR_PREFIX="[ERROR] "

###############################################################################
## record which version of DeepDive compiled this
deepdive version >run/"$compileDir"/deepdive.version
## record the environment used for compilation
env >run/"$compileDir"/environ

###############################################################################
## compile a full deepdive.conf from source code
if ! [[ -e $DEEPDIVE_COMPILE_INPUT_JSON ]]; then
Expand Down

0 comments on commit f8e97ab

Please sign in to comment.