facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

No such file or directory: .../build/buck-info.json, files missing from release zip #2521

Closed tkruse closed 4 years ago

tkruse commented 4 years ago

I install buck by downloading and extracting a released zip. That worked with v2017.05.31.01. However, it fails with later releases starting at v2017.11.16.01.

wget https://github.com/facebook/buck/archive/v2017.11.16.01.zip
unzip -u -q v2017.11.16.01.zip
# cd into folder with .buckconfig
/full/path/to/buck/bin/buck
Traceback (most recent call last):
  File "/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/bin/../programs/buck.py", line 51, in <module>
    propagate_failure(main(sys.argv))
  File "/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/bin/../programs/buck.py", line 38, in main
    with get_repo(project) as buck_repo:
  File "/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/bin/../programs/buck.py", line 28, in get_repo
    return BuckRepo(THIS_DIR, p)
  File "/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/programs/buck_repo.py", line 46, in __init__
    super(BuckRepo, self).__init__(buck_project)
  File "/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/programs/buck_tool.py", line 146, in __init__
    self._package_info = self._get_package_info()
  File "/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/programs/buck_repo.py", line 65, in _get_package_info
    return json.loads(self.__read_file(BUCK_INFO_LOCATION))
  File "/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/programs/buck_repo.py", line 68, in __read_file
    with open(os.path.join(self.buck_dir, filename)) as file:
IOError: [Errno 2] No such file or directory: '/home/kruset/work/java/build-bench/caches/buck/buckv2017.11.16.01/build/buck-info.json'

I assume that I just need to run ant inside the extracted zip to make this work. It might be nice to add the missing files to the zip or to improve the error handling.

This ticket can be closed without further comment if this expected behavior.

v-jizhang commented 4 years ago

Yes, it is expected.