Skip to content

Conversation

Friendseeker
Copy link
Member

@Friendseeker Friendseeker commented Jan 2, 2024

Fixes #2205, sbt/zinc#140

Validating the PR

Before the fix

❯ jar tf /Users/jiahuitan/.ivy2/local/org.scala-sbt/compiler-interface/1.9.0-SNAPSHOT/srcs/compiler-interface-sources.jar
META-INF/MANIFEST.MF
xsbti/
xsbti/api/
xsbti/compile/
xsbti/compile/analysis/
xsbti/AnalysisCallback.java
xsbti/AnalysisCallback2.java
xsbti/ArtifactInfo.java
xsbti/BasicVirtualFileRef.java
xsbti/CompileCancelled.java
xsbti/CompileFailed.java
xsbti/FileConverter.java
xsbti/InteractiveConsoleFactory.java
xsbti/InteractiveConsoleInterface.java
xsbti/InteractiveConsoleResponse.java
xsbti/InteractiveConsoleResult.java
xsbti/PathBasedFile.java
xsbti/Reporter.java
xsbti/UseScope.java
xsbti/VirtualDirectory.java
xsbti/VirtualFile.java
xsbti/VirtualFileRef.java
xsbti/VirtualFileWrite.java
xsbti/api/AbstractLazy.java
xsbti/api/Lazy.java
xsbti/api/Modifiers.java
xsbti/api/SafeLazy.java
xsbti/compile/APIChange.java
xsbti/compile/AnalysisContents.java
xsbti/compile/AnalysisStore.java
xsbti/compile/AuxiliaryClassFiles.java
xsbti/compile/CachedCompiler.java
xsbti/compile/CachedCompilerProvider.java
xsbti/compile/Changes.java
xsbti/compile/ClassFileManager.java
xsbti/compile/CompileAnalysis.java
xsbti/compile/CompileOrder.java
xsbti/compile/CompileProgress.java
xsbti/compile/CompilerBridgeProvider.java
xsbti/compile/CompilerInterface2.java
xsbti/compile/ConsoleInterface1.java
xsbti/compile/DefaultExternalHooks.java
xsbti/compile/DefinesClass.java
xsbti/compile/DependencyChanges.java
xsbti/compile/ExternalHooks.java
xsbti/compile/GlobalsCache.java
xsbti/compile/IncToolOptionsUtil.java
xsbti/compile/IncrementalCompiler.java
xsbti/compile/InitialChanges.java
xsbti/compile/InvalidationProfiler.java
xsbti/compile/JavaCompiler.java
xsbti/compile/JavaTool.java
xsbti/compile/JavaTools.java
xsbti/compile/Javadoc.java
xsbti/compile/MultipleOutput.java
xsbti/compile/Output.java
xsbti/compile/OutputGroup.java
xsbti/compile/PerClasspathEntryLookup.java
xsbti/compile/RunProfiler.java
xsbti/compile/ScalaCompiler.java
xsbti/compile/ScalaInstance.java
xsbti/compile/ScaladocInterface1.java
xsbti/compile/ScaladocInterface2.java
xsbti/compile/SingleOutput.java
xsbti/compile/UsedName.java
xsbti/compile/WrappedClassFileManager.java
xsbti/compile/analysis/Compilation.java
xsbti/compile/analysis/ReadCompilations.java
xsbti/compile/analysis/ReadSourceInfos.java
xsbti/compile/analysis/ReadStamps.java
xsbti/compile/analysis/SourceInfo.java
xsbti/compile/analysis/Stamp.java

After the fix (tested via using a snapshot version of sbt build against the PR branch, then running publishLocal on zinc repo.)

jar tf /Users/jiahuitan/.ivy2/local/org.scala-sbt/compiler-interface/1.9.0-SNAPSHOT/srcs/compiler-interface-sources.jar
META-INF/MANIFEST.MF
xsbti/
xsbti/api/
xsbti/compile/
xsbti/compile/analysis/
xsbti/AnalysisCallback.java
xsbti/AnalysisCallback2.java
xsbti/ArtifactInfo.java
xsbti/BasicVirtualFileRef.java
xsbti/CompileCancelled.java
xsbti/CompileFailed.java
xsbti/FileConverter.java
xsbti/InteractiveConsoleFactory.java
xsbti/InteractiveConsoleInterface.java
xsbti/InteractiveConsoleResponse.java
xsbti/InteractiveConsoleResult.java
xsbti/PathBasedFile.java
xsbti/Reporter.java
xsbti/UseScope.java
xsbti/VirtualDirectory.java
xsbti/VirtualFile.java
xsbti/VirtualFileRef.java
xsbti/VirtualFileWrite.java
xsbti/api/AbstractLazy.java
xsbti/api/Access.java
xsbti/api/AnalyzedClass.java
xsbti/api/Annotated.java
xsbti/api/Annotation.java
xsbti/api/AnnotationArgument.java
xsbti/api/ClassDefinition.java
xsbti/api/ClassLike.java
xsbti/api/ClassLikeDef.java
xsbti/api/Companions.java
xsbti/api/Constant.java
xsbti/api/Def.java
xsbti/api/Definition.java
xsbti/api/DefinitionType.java
xsbti/api/DependencyContext.java
xsbti/api/EmptyType.java
xsbti/api/Existential.java
xsbti/api/ExternalDependency.java
xsbti/api/FieldLike.java
xsbti/api/Id.java
xsbti/api/IdQualifier.java
xsbti/api/InternalDependency.java
xsbti/api/Lazy.java
xsbti/api/MethodParameter.java
xsbti/api/Modifiers.java
xsbti/api/NameHash.java
xsbti/api/Package.java
xsbti/api/ParameterList.java
xsbti/api/ParameterModifier.java
xsbti/api/ParameterRef.java
xsbti/api/Parameterized.java
xsbti/api/ParameterizedDefinition.java
xsbti/api/Path.java
xsbti/api/PathComponent.java
xsbti/api/Polymorphic.java
xsbti/api/Private.java
xsbti/api/Projection.java
xsbti/api/Protected.java
xsbti/api/Public.java
xsbti/api/Qualified.java
xsbti/api/Qualifier.java
xsbti/api/SafeLazy.java
xsbti/api/Singleton.java
xsbti/api/Structure.java
xsbti/api/Super.java
xsbti/api/This.java
xsbti/api/ThisQualifier.java
xsbti/api/Type.java
xsbti/api/TypeAlias.java
xsbti/api/TypeDeclaration.java
xsbti/api/TypeMember.java
xsbti/api/TypeParameter.java
xsbti/api/Unqualified.java
xsbti/api/Val.java
xsbti/api/Var.java
xsbti/api/Variance.java
xsbti/compile/APIChange.java
xsbti/compile/AnalysisContents.java
xsbti/compile/AnalysisStore.java
xsbti/compile/AuxiliaryClassFiles.java
xsbti/compile/CachedCompiler.java
xsbti/compile/CachedCompilerProvider.java
xsbti/compile/Changes.java
xsbti/compile/ClassFileManager.java
xsbti/compile/ClassFileManagerType.java
xsbti/compile/ClasspathOptions.java
xsbti/compile/CompileAnalysis.java
xsbti/compile/CompileOptions.java
xsbti/compile/CompileOrder.java
xsbti/compile/CompileProgress.java
xsbti/compile/CompileResult.java
xsbti/compile/CompilerBridgeProvider.java
xsbti/compile/CompilerInterface2.java
xsbti/compile/Compilers.java
xsbti/compile/ConsoleInterface1.java
xsbti/compile/DefaultExternalHooks.java
xsbti/compile/DefinesClass.java
xsbti/compile/DeleteImmediatelyManagerType.java
xsbti/compile/DependencyChanges.java
xsbti/compile/ExternalHooks.java
xsbti/compile/FileHash.java
xsbti/compile/GlobalsCache.java
xsbti/compile/IncOptions.java
xsbti/compile/IncToolOptions.java
xsbti/compile/IncToolOptionsUtil.java
xsbti/compile/IncrementalCompiler.java
xsbti/compile/InitialChanges.java
xsbti/compile/Inputs.java
xsbti/compile/InvalidationProfiler.java
xsbti/compile/JavaCompiler.java
xsbti/compile/JavaTool.java
xsbti/compile/JavaTools.java
xsbti/compile/Javadoc.java
xsbti/compile/MiniOptions.java
xsbti/compile/MiniSetup.java
xsbti/compile/MultipleOutput.java
xsbti/compile/Output.java
xsbti/compile/OutputGroup.java
xsbti/compile/PerClasspathEntryLookup.java
xsbti/compile/PreviousResult.java
xsbti/compile/RunProfiler.java
xsbti/compile/ScalaCompiler.java
xsbti/compile/ScalaInstance.java
xsbti/compile/ScaladocInterface1.java
xsbti/compile/ScaladocInterface2.java
xsbti/compile/Setup.java
xsbti/compile/SingleOutput.java
xsbti/compile/TransactionalManagerType.java
xsbti/compile/UsedName.java
xsbti/compile/WrappedClassFileManager.java
xsbti/compile/analysis/Compilation.java
xsbti/compile/analysis/ReadCompilations.java
xsbti/compile/analysis/ReadSourceInfos.java
xsbti/compile/analysis/ReadStamps.java
xsbti/compile/analysis/SourceInfo.java
xsbti/compile/analysis/Stamp.java

@Friendseeker Friendseeker requested a review from eed3si9n January 2, 2024 02:30
@Friendseeker Friendseeker force-pushed the packageSrc-managed-source branch from bec6713 to e4ab56e Compare January 2, 2024 04:58
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eed3si9n eed3si9n merged commit cfe0fc8 into sbt:1.10.x Jan 2, 2024
@Friendseeker Friendseeker deleted the packageSrc-managed-source branch January 2, 2024 05:44
@jroper
Copy link
Member

jroper commented Aug 26, 2024

I've updated this to include all sources, not just managed and unmanaged (so, using the sources and sourceDirectories task), in #7630. Both compile and doc use sources and sourceDirectories, it makes no sense for the packageSrc task to gather managed and unmanaged sources together itself.

eed3si9n pushed a commit that referenced this pull request Aug 26, 2024
This follows on from #7470, to include all sources, not just managed and
unmanaged, in the source jar, along with all resources (previously only
unmanaged resources were included).

This means that if, for whatever crazy reason, someone does modify the
`sources` task to include additional sources or filter out sources, rather than
using the managed or unmanaged source mechanisms, their changes will still be
reflected in the source jar.
Friendseeker pushed a commit to Friendseeker/sbt that referenced this pull request Oct 20, 2024
This follows on from sbt#7470, to include all sources, not just managed and
unmanaged, in the source jar, along with all resources (previously only
unmanaged resources were included).

This means that if, for whatever crazy reason, someone does modify the
`sources` task to include additional sources or filter out sources, rather than
using the managed or unmanaged source mechanisms, their changes will still be
reflected in the source jar.
Friendseeker pushed a commit to Friendseeker/sbt that referenced this pull request Oct 20, 2024
This follows on from sbt#7470, to include all sources, not just managed and
unmanaged, in the source jar, along with all resources (previously only
unmanaged resources were included).

This means that if, for whatever crazy reason, someone does modify the
`sources` task to include additional sources or filter out sources, rather than
using the managed or unmanaged source mechanisms, their changes will still be
reflected in the source jar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

include managed sources in packageSrc?
3 participants