Answers.Body: <p><strong>tldr</strong>: It's safe but mildly annoying. Please feel free to send a pull-request to update these files.</p>
  
  <p><strong>Longer</strong>: DAO files are auto-generated when <code>civibuild</code> calls the script <code>xml/GenCode.php</code> with the data in <code>xml/schema</code>. However, running <code>GenCode</code> is traditionally pretty slow -- even on a fast workstation, it can add 30 seconds to the build-time.</p>
  
  <p>Starting somewhere in 4.7.x, we did an optimization: if the checksum looks right, then <code>GenCode</code> keeps the DAO. (Hooray, faster!) If the checksum looks wrong, then it regenerates the DAO.</p>
  
  <p>In a typical scenario, you might edit a file in <code>xml/schema</code>, then run <code>GenCode</code>, then observe several changes to your local DAO. The <code>GenCodeChecksum</code> would be one of several changes. You'd commit those changes and send them in with the PR.</p>
  
  <p>Right now, I see something like what you describe -- the <em>only</em> difference between the upstream DAO and the local DAO is the checksum. This can happen occasionally (eg if there were contemporaneous PRs manipulating schema and the precise order-of-operations was unfavorable). The consequences are:</p>
  
  <ul>
  <li><code>GenCode</code> spends an extra second regenerating 1-3 files.</li>
  <li>Your <code>git diff</code> shows something unexpected on 1-3 files.</li>
  </ul>
  
  <p>That's mildly annoying - but you still wind up with the right code, so it's safe.</p>
  
  <p>You can fix it by submitting a PR to update the DAO's with the latest <code>GenCodeChecksum</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-16T00:09:57.330Z
Answers.LastActivityDate: 2017-03-16T00:09:57.330Z
Answers.UserDisplayName: Tim Otten
Body: <p>I just created a new site with buildkit: </p>
  
  <pre><code>$ civibuild create foo --url http://foo --type drupal-demo
  </code></pre>
  
  <p>Then I went into CiviCRM and looked at the git repo</p>
  
  <pre><code>$ cd ~/buildkit/build/foo/sites/all/modules/civicrm
  $ git status
  </code></pre>
  
  <p>and I see:</p>
  
  <pre><code>    modified:   CRM/Case/DAO/Case.php
      modified:   CRM/Core/DAO/AllCoreTables.data.php
      modified:   CRM/Financial/DAO/PaymentProcessor.php
  </code></pre>
  
  <p>Why? I would expect the repo to be clean after a fresh install. The diffs for these files show a different value for <code>GenCodeChecksum</code> within the docblock header for the file, and that's the entirety of the uncommitted changes. What's going on here?</p>
  
Tags: <civicrm-buildkit><civibuild>
Title: Why do I have GenCodeChecksum uncommitted changes after a fresh civibuild create?
ThreadText: # Why do I have GenCodeChecksum uncommitted changes after a fresh civibuild create?
  
  (Asked by: username_0 on 2017-03-15)
  
  I just created a new site with buildkit:
  
  ```
  $ civibuild create foo --url http://foo --type drupal-demo
  
  ```
  
  Then I went into CiviCRM and looked at the git repo
  
  ```
  $ cd ~/buildkit/build/foo/sites/all/modules/civicrm
  $ git status
  
  ```
  
  and I see:
  
  ```
      modified:   CRM/Case/DAO/Case.php
      modified:   CRM/Core/DAO/AllCoreTables.data.php
      modified:   CRM/Financial/DAO/PaymentProcessor.php
  
  ```
  
  Why? I would expect the repo to be clean after a fresh install. The diffs for these files show a different value for `GenCodeChecksum` within the docblock header for the file, and that's the entirety of the uncommitted changes. What's going on here?
  
  **Tags:** civicrm-buildkit, civibuild
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-16. Score: 1 | Accepted answer
  
  **tldr**: It's safe but mildly annoying. Please feel free to send a pull-request to update these files.
  
  **Longer**: DAO files are auto-generated when `civibuild` calls the script `xml/GenCode.php` with the data in `xml/schema`. However, running `GenCode` is traditionally pretty slow -- even on a fast workstation, it can add 30 seconds to the build-time.
  
  Starting somewhere in 4.7.x, we did an optimization: if the checksum looks right, then `GenCode` keeps the DAO. (Hooray, faster!) If the checksum looks wrong, then it regenerates the DAO.
  
  In a typical scenario, you might edit a file in `xml/schema`, then run `GenCode`, then observe several changes to your local DAO. The `GenCodeChecksum` would be one of several changes. You'd commit those changes and send them in with the PR.
  
  Right now, I see something like what you describe -- the *only* difference between the upstream DAO and the local DAO is the checksum. This can happen occasionally (eg if there were contemporaneous PRs manipulating schema and the precise order-of-operations was unfavorable). The consequences are:
  
  * `GenCode` spends an extra second regenerating 1-3 files.
  * Your `git diff` shows something unexpected on 1-3 files.
  
  That's mildly annoying - but you still wind up with the right code, so it's safe.
  
  You can fix it by submitting a PR to update the DAO's with the latest `GenCodeChecksum`.
  
  
  ---
  
  