Themekit: Checksum on files prevents theme watch with other environment

Created on 10 Feb 2020  路  4Comments  路  Source: Shopify/themekit

Describe the bug

When switching environments for theme watch, the new checksum feature will not upload when saving.

For example, it is common for some of our stores that we have different shopify stores for each language (one for English, one for German, etc.) We edit on main store development theme and then switch environments and add edit to other store by using theme watch and saving files that had edits in editor so the other environment gets the same changes.

Now it seems that the checksum doesn't upload the file from the editor even when a different environment is set with theme watch.

To Reproduce
Steps to reproduce the behavior:

  1. theme watch --env=development-english
  2. Edit product.liquid and save
  3. theme watch does upload new file
  4. close theme watch
  5. For separate store: theme watch --env=development-german
  6. save product.liquid (no need to edit or change, already has needed edits)
  7. Won't upload unless you add new content the the product.liquid. (Ex. add a space, so theme watch sees change to file)

Expected behavior

If you are watching a different environment with theme watch, then saving should still upload and process file even if the file has no changes

Environment (please complete the following information):

  • OS Ubuntu 18

    • Themekit version: 1.0.3

  • Editor: VSCode

Most helpful comment

Yup, it is safe! You can actually even run theme watch --env=development-* to run all of your development prefixed environments

All 4 comments

I am not sure how to proceed with this because from themekits perspective, you have not changed the file. I am going to be adding checksums sourced from the API soon so hopefully, this will alleviate the issue in the future. I understand that this is probably pretty annoying

Thanks for the response @tanema. Yea, that makes sense that themekit doesn't see it as a changed file

After experimenting with a different development flow, I found that you could watch multiple environments. For example, theme watch --env=development-english --env=development-german, which can be convenient at certain times. I didn't find anything that said you could or couldn't do that, so I was wondering if it okay/safe to do it that way?

Yup, it is safe! You can actually even run theme watch --env=development-* to run all of your development prefixed environments

This should now be fixed as of 1.1.0 as the watch command, which gets instantiated for each environment now tracks the asset checksums rather than the file event watcher. I have tested on my local themes and it works as expected. Please re-open if this continues to be an issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

particle6 picture particle6  路  9Comments

smjeffries-snap picture smjeffries-snap  路  9Comments

ingueferroque picture ingueferroque  路  6Comments

jamesmthornton picture jamesmthornton  路  5Comments

hatsumatsu picture hatsumatsu  路  5Comments