Giter Club home page Giter Club logo

Comments (9)

fniephaus avatar fniephaus commented on July 28, 2024

Puh, this already sounds pretty advanced for a helper framework.
I don't think that there's a need for a migration system. I can't think of a scenario where I would really need to know about this.
Besides, I think its a good idea to clear the cache folder after upgrade by default. I haven't tested it yet, but aren't cache and settings deleted automatically after replacing a workflow with a new version?
Keeping settings might be useful but certainly raises the problem of incompatible versions.

from alfred-workflow.

deanishe avatar deanishe commented on July 28, 2024

Certainly the data directory isn't cleared after an update. I think that would be bad form: all your settings gone.

Let's forget about the framework, but I do think the first_run boolean and last_version_run property would be useful: in most cases you wouldn't care if it's the first time v2.1.1 has run if the last version to run was v2.1.0, but you might if it was v1.7, as you may need to clear the caches and/or update the data.

from alfred-workflow.

fniephaus avatar fniephaus commented on July 28, 2024

Alfred-Workflow could easily clear the caches right before an update is initiated. Developers would have to check their settings in their scripts if they have made changes. Providing a simple first_run() method would make it easier, but that's as far as it should go, right?

from alfred-workflow.

deanishe avatar deanishe commented on July 28, 2024

It'd probably make more sense to have a last_version_run method/property. That'd give you a better idea of whether or not any update may be necessary:

>>> first_run = wf.first_run()
True
# what now?

>>> v = wf.last_version_run()
Version(1.7)
>>> if v < Version('2.0'):
    migrate_v1_to_v2()

from alfred-workflow.

fniephaus avatar fniephaus commented on July 28, 2024

Sounds about right! :)

from alfred-workflow.

deanishe avatar deanishe commented on July 28, 2024

Of course, it's dependent on some implementation of semantic versioning/version string parsing.

from alfred-workflow.

fniephaus avatar fniephaus commented on July 28, 2024

True, I thought we already have agreed on semantic versioning for version 2? ;)

from alfred-workflow.

deanishe avatar deanishe commented on July 28, 2024

We had. We have. It will be semantic, but won't implement the full standard because that's rather complex.

from alfred-workflow.

deanishe avatar deanishe commented on July 28, 2024

Added in v1.10.1.

from alfred-workflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.