GithubHelp home page GithubHelp logo

Var versioning about clojuredocs HOT 8 CLOSED

zk avatar zk commented on August 21, 2024
Var versioning

from clojuredocs.

Comments (8)

zk avatar zk commented on August 21, 2024

Trying to decide how to proceed with moving the data.

No function version data exists in the DB right now, so I'll start by adding the ability to parse and store to the analyzer, and add a version column to the functions table. Then, write a migration to add the function_versions table, and populate that table with data from the functions table.

Effectively, whatever data exists in the functions table (including the new version column) will become the first version of that var as far as CD is concerned.

from clojuredocs.

zk avatar zk commented on August 21, 2024

Updated clojuredocs-analyzer to store version in the newly created functions.version column.

Core import: http://gist.github.com/605416
Contrib import: http://gist.github.com/605424

Also imported ring, version was added correctly.

clojuredocs-analyzer commit

from clojuredocs.

zk avatar zk commented on August 21, 2024

Migrations are done, schema now looks like this:

function                  function_versions
--------------            --------------------------
library         <------   function_id
ns                        doc
name                      source
etc                       etc

I also considered keeping line / file / doc / etc in the functions table, and only fetch older versions when requested by the user. This would get rid of the join that will be made every time somebody requests a function, but I'll leave that as a future optimization path.

from clojuredocs.

zk avatar zk commented on August 21, 2024

clojuredocs-analzyer has been updated to import to the new versioning schema: analyzer commit

As of now, all libraries that are run through the analyzer now have their version numbers parsed as well (only lein supported atm). New versions are now stored only if the version number on the lib is different than previous versions.

Long-term todos:

  • Version sorting (sorts by created_at date for now)

Next up is importing older versions of core and contrib for test data to implement the versions UI on top of.

from clojuredocs.

zk avatar zk commented on August 21, 2024

Just ran an import of 1.3.0-alpha1, 801 vars vs 781 vars in 1.2.0

Looks like the unchecked-* vars were removed: http://gist.github.com/610976 (line 1655)

The analyzer will have to be changed, vars should no longer be removed.

from clojuredocs.

zk avatar zk commented on August 21, 2024

So a bit of churn here.

Instead of the changes outlined above, I've gone the simpler route of adding version columns to the libraries, namespaces, and functions tables. Additionally I've added a current column to the libraries table to specify the primary version of a specific library.

I feel that, while not as correct as the functions -> function_versions (and libraries -> library_versions, namespaces -> namespace_versions) method, it's simpler to reason about.

Relevant changes are in the var-versioning-simple branch.

Also, a bit of work on the UI has been done:

macroexpand-1 1.2.0 screenshot

macroexpand-1 1.3.0-alpha1 screenshot

Side note: URLs have been prettified so

http://clojuredocs.org/v/1808

becomes

http://clojuredocs.org/clojure_core/current/clojure.core/macroexpand-1

and

http://clojuredocs.org/v/1927

becomes

http://clojuredocs.org/clojure_core/current/clojure.core/even_q

from clojuredocs.

zk avatar zk commented on August 21, 2024

Switched from using the word 'current' to 'stable' to describe the latest production version of a library.

Versioning UI updates

Clojure 1.2.0 is the 'stable' version here:

Stable version var page

Stable version var page showing drop-down

After clicking on permalink (notice version number of stable gets added to url)

After clicking on non-stable version

Switched 'stable' version to 1.3.0-alpha1:

Stable version

Non-stable version

from clojuredocs.

zk avatar zk commented on August 21, 2024

Finished up var-versioning, rebased into master

from clojuredocs.

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.