All Projects → aserg-ufmg → Apidiff

aserg-ufmg / Apidiff

Licence: mit
A tool to identify breaking and non-breaking changes between two versions of a Java library

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Apidiff

Trino
Trino: Master your translations with command line!
Stars: ✭ 118 (+321.43%)
Mutual labels:  api, tool
Rundeck Cli
CLI tool for Rundeck
Stars: ✭ 98 (+250%)
Mutual labels:  api, tool
Alass
"Automatic Language-Agnostic Subtitle Synchronization"
Stars: ✭ 421 (+1403.57%)
Mutual labels:  api, tool
Mockit
A tool to quickly mock out end points, setup delays and more...
Stars: ✭ 1,534 (+5378.57%)
Mutual labels:  api, tool
Awesome Documentation Tools
🔥 📚 All the tools, processes and resources you need to create an awesome API & Project documentation
Stars: ✭ 138 (+392.86%)
Mutual labels:  api, tool
Customstage
A JavaFX UI framework to create fully customized undecorated windows
Stars: ✭ 148 (+428.57%)
Mutual labels:  api, tool
Glasscord
[BUGFIXES ONLY, SUPPORT WILL DROP MAR 1, 2021] Injecting composition effects into Electron applications!
Stars: ✭ 737 (+2532.14%)
Mutual labels:  api, tool
Hub Sync
Sync your github forks without git.
Stars: ✭ 21 (-25%)
Mutual labels:  api
Slate
Beautiful static documentation for your API
Stars: ✭ 33,447 (+119353.57%)
Mutual labels:  api
Eskom Loadshedding Api
Basic (in-progress) api to expose the eskom endpoints for loadshedding.
Stars: ✭ 21 (-25%)
Mutual labels:  api
Repos
Pull down a list of GitHub repos for the given user or org, and save to a local JSON file.
Stars: ✭ 20 (-28.57%)
Mutual labels:  api
Python Common Cache
This project is a cache component based on the memory and it is lightweight, simple and customizable. 🐍 😃
Stars: ✭ 21 (-25%)
Mutual labels:  api
Durt
Command line tool for calculating the size of files and directories
Stars: ✭ 27 (-3.57%)
Mutual labels:  tool
Marathon
A work-in-progress toolkit and library for SONIC THE HEDGEHOG file formats
Stars: ✭ 21 (-25%)
Mutual labels:  api
Quip Export
Export all folders and documents from Quip
Stars: ✭ 28 (+0%)
Mutual labels:  api
Zhihu Api
Zhihu API for Humans
Stars: ✭ 911 (+3153.57%)
Mutual labels:  api
Horrible Downloader
horriblesubs.info python API and CLI
Stars: ✭ 28 (+0%)
Mutual labels:  api
Vhackxtbot Python
Python API for vHackXT Game
Stars: ✭ 27 (-3.57%)
Mutual labels:  api
Hoppscotch
👽 Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+123360.71%)
Mutual labels:  api
Aeris Ios Library
Contains a demo project utilizing the AerisWeather SDK for iOS to help you get started with using our library.
Stars: ✭ 21 (-25%)
Mutual labels:  api

APIDiff

A tool to identify API breaking and non-breaking changes between two versions of a Java library. APIDiff analyses libraries hosted on the distributed version control system git.

Catalog

Breaking Changes are modifications performed in API elements such as types, methods, and fields that may break client applications:

Element Breaking Changes (BC)
Type rename, move, move and rename, remove, lost visibility, add final modifier, remove static modifier, change in supertype, remove supertype
Method move, rename, remove, push down, inline, change in parameter list, change in exception list, change in return type, lost visibility, add final modifier, remove static modifier
Field remove, move, push down field, change in default value, change in type field, lost visibility, add final modifier

Non-breaking Changes are modifications that do not break clients:

Element Non-breaking Changes (NBC)
Type add, extract supertype, gain visibility, remove final modifier, add static modifier, add supertype, deprecated type
Method pull up, gain visibility, remove final modifier, add static modifier, deprecated method, add, extract
Field pull up, add, deprecated field, gain visibility, remove final modifier

The refactorings catalog is reused from RefDiff.

Examples

  • Detecting changes in version histories:
APIDiff diff = new APIDiff("bumptech/glide", "https://github.com/bumptech/glide.git");
diff.setPath("/home/projects/github");

Result result = diff.detectChangeAllHistory("master", Classifier.API);
for(Change changeMethod : result.getChangeMethod()){
    System.out.println("\n" + changeMethod.getCategory().getDisplayName() + " - " + changeMethod.getDescription());
}
  • Detecting changes in specific commit:
APIDiff diff = new APIDiff("mockito/mockito", "https://github.com/mockito/mockito.git");
diff.setPath("/home/projects/github");

Result result = diff.detectChangeAtCommit("4ad5fdc14ca4b979155d10dcea0182c82380aefa", Classifier.API);
for(Change changeMethod : result.getChangeMethod()){
    System.out.println("\n" + changeMethod.getCategory().getDisplayName() + " - " + changeMethod.getDescription());
}
  • Fetching new commits:
APIDiff diff = new APIDiff("bumptech/glide", "https://github.com/bumptech/glide.git");
diff.setPath("/home/projects/github");
    
Result result = diff.fetchAndDetectChange(Classifier.API);
for(Change changeMethod : result.getChangeMethod()){
    System.out.println("\n" + changeMethod.getCategory().getDisplayName() + " - " + changeMethod.getDescription());
}
  • Writing a CSV file:
APIDiff diff = new APIDiff("mockito/mockito", "https://github.com/mockito/mockito.git");
diff.setPath("/home/projects/github");
Result result = diff.detectChangeAtCommit("4ad5fdc14ca4b979155d10dcea0182c82380aefa", Classifier.API);
		
List<String> listChanges = new ArrayList<String>();
listChanges.add("Category;isDeprecated;containsJavadoc");
for(Change changeMethod : result.getChangeMethod()){
    String change = changeMethod.getCategory().getDisplayName() + ";" + changeMethod.isDeprecated()  + ";" + changeMethod.containsJavadoc() ;
    listChanges.add(change);
}
UtilFile.writeFile("output.csv", listChanges);
  • Filtering Packages according to their names:
Classifier.INTERNAL: Elements that are in packages with the term "internal".

Classifier.TEST: Elements that are in packages with the terms "test"|"tests", or is in source file "src/test", or ends with "test.java"|"tests.java".

Classifier.EXAMPLE: Elements that are in packages with the terms "example"|"examples"|"sample"|"samples"|"demo"|"demos"

Classifier.EXPERIMENTAL: Elements that are in packages with the term "experimental".

Classifier.NON_API: Internal, test, example or experimental elements.

Classifier.API: Elements that are not non-APIs.

Usage

APIDiff is available in the Maven Central Repository:

<dependency>
    <groupId>com.github.aserg-ufmg</groupId>
    <artifactId>apidiff</artifactId>
    <version>2.0.0</version>
</dependency>

Publications

Aline Brito, Laerte Xavier, Andre Hora, Marco Tulio Valente. APIDiff: Detecting API Breaking Changes. In 25th International Conference on Software Analysis, Evolution and Reengineering (SANER), Tool Track, pages 1-5, 2018.

Learn more about our research group at http://aserg.labsoft.dcc.ufmg.br/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].