Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the dataflow manual section about shading. #4681

Merged
merged 4 commits into from
May 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions dataflow/manual/content.tex
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,25 @@ \section{Introduction}


\paragraph{Potential version conflicts if you export the Dataflow Framework}
Suppose that two tools both utilize the Dataflow Framework. If neither one
exports the Dataflow Framework's classes or the Checker Framework
annotations, both tools can be run at the same time. If both export the
classes, then it may be impossible for users to run both tools, because
they may require a different version of the Dataflow Framework. The
Checker Framework necessarily exports the Dataflow Framework. If your tool
cannot shadow the Checker Framework and Dataflow Framework classes, and you
cannot conform to the Checker Framework release schedule, then instead of
using the \code{dataflow} artifact at
\url{https://search.maven.org/artifact/org.checkerframework/dataflow/},
you can use the \code{dataflow-shaded} artifact at
\url{https://search.maven.org/artifact/org.checkerframework/dataflow-shaded/}.
It contains the Dataflow Framework in package
\code{org.checkerframework.shaded.dataflow} and also its dependencies in
their usual packages, namely the Checker Framework
qualifiers and the plume-util project
(\url{https://github.com/plume-lib/plume-util}).
(There may still be a problem if two different non-Checker-Framework tools
both export different, incompatible versions of the \code{dataflow-shaded}
artifact.)

If your tool uses the Dataflow Framework, then \textbf{please shade the
Dataflow Framework in your tool}. You can do this using the Maven Shade
Plugin, \url{https://maven.apache.org/plugins/maven-shade-plugin/}, or the
Gradle Shadow Plugin, \url{https://imperceptiblethoughts.com/shadow/}.
If you cannot shade the Checker Framework and Dataflow Framework classes, then
please ask the Checker Framework developers to create a shaded artifact
just for you, every time they release the Checker Framework.
See \code{dataflow/build.gradle} for instructions.

The reason to shade the Dataflow Framework is to permit users to run multiple tools.
Suppose that two tools both utilize the Dataflow Framework.
If the two tools use different versions of the Dataflow Framework,
then it may be impossible for users to run both tools due to a version conflict.
The Checker Framework uses an unshaded version the Dataflow Framework,
since the Dataflow Framework is part of the Checker Framework.
If you do not shade the Dataflow Framework in your tool, then users will
not be able to use both your tool and the Checker Framework (or any other
tool that does not shade the Checker Framework and Dataflow Framework classes).


\section{Organization}
Expand Down Expand Up @@ -1997,6 +1996,6 @@ \subsubsubsection{Alias Information}
% LocalWords: DeclarationFromElement BoxedClass treeLookup getValue
% LocalWords: nodeValues AdditionNode postconversion treelookup desugar
% LocalWords: LocalVariableNode AconcurrentSemantics MonotonicNonNull
% LocalWords: MonotonicQualifier IntegerLiteralNode EqualToNode
% LocalWords: MonotonicQualifier IntegerLiteralNode EqualToNode unshaded
% LocalWords: ConstSimple SelfReference PureMethodCall javacutil
% LocalWords: stubparser TreeParser TreeBuilder DetachedVarSymbol LiveSimple