Auto-correction tool for livelihood dependencies:ancient

Web Technology   Digital Transformation Technology Artificial Intelligence Technology   Natural Language Processing Technology   Semantic Web Technology   Deep Learning Technology   Online Learning & Reinforcement Learning Technology  Chatbot and Q&A Technology   User Interface Technology   Knowledge Information Processing Technology   Reasoning Technology  Clojure Programming

I’m going to introduce some libraries that are useful for using Clojure as a reminder. First of all, I’d like to talk about the lein-ancient plugin, which is a tool to automatically check for updates of leiningen’s dependency libraries (written under :dependencies) managed in project.clj.

The following is written in the ~/.lein/profiles.clj file located in the root of your PC, not in each project.

{:user {
	:plugins [
		[lein-ancient "0.7.0"]
	]
}}

After that, you can type the following in the terminal to check the version of the dependent library.

$ lein ancient
[com.taoensso/timbre "2.6.2"] is available but we use "2.1.2"
[potemkin "0.3.3"] is available but we use "0.3.0"
[pandect "0.3.0"] is available but we use "0.2.3"

Dependencies on snapshots and plugins as well as libraries are possible by adding the following options after them. :allow-snapshots, :allow-qualified and :allow-all, and the kind of artifacts with :plugins, :java-agents To see all options, just add :all. There is also a mode that will automatically do the rewriting for you.

$ lein ancient upgrade :interactive

[com.taoensso/timbre "2.6.2"] is available but we use "2.1.2"
Do you want to upgrade? [yes/no] yes

[potemkin "0.3.3"] is available but we use "0.3.0"
Do you want to upgrade? [yes/no] no

[pandect "0.3.0"] is available but we use "0.2.3"
Do you want to upgrade? [yes/no] yes

2 artifacts were upgraded.

This is a very useful library to have when you want to use code that has been created for a while again, or when you want to copy and use external code.

コメント

Exit mobile version
タイトルとURLをコピーしました