-
-
Save 2m/51fc0490ffea7bdc4cb9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import zipfile | |
def files_in_jar(filename): | |
with zipfile.ZipFile(filename) as jar: | |
for info in jar.infolist(): | |
yield info.filename | |
def files_in_dir(dir): | |
for root, dirnames, filenames in os.walk(dir): | |
for filename in filenames: | |
yield os.path.join(root.replace(dir, ''), filename) | |
def missing_classes(name, location): | |
jar_contents = list(files_in_jar('{}/target/{}-experimental_2.10-1.0-SNAPSHOT.jar'.format(location, name))) | |
for class_file in files_in_dir('{}/target/classes/'.format(location)): | |
if class_file not in jar_contents: | |
yield class_file | |
projects = [ | |
('akka-http', 'akka-http'), | |
('akka-http-core', 'akka-http-core'), | |
('akka-http-jackson', 'akka-http-marshallers-java/akka-http-jackson'), | |
('akka-http-xml', 'akka-http-marshallers-scala/akka-http-xml'), | |
('akka-http-spray-json', 'akka-http-marshallers-scala/akka-http-spray-json'), | |
('akka-http-testkit', 'akka-http-testkit'), | |
('akka-stream', 'akka-stream'), | |
('akka-stream-tck', 'akka-stream-tck'), | |
('akka-stream-testkit', 'akka-stream-testkit') | |
] | |
for name, location in projects: | |
print(name, list(missing_classes(name, location))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment