Skip to content

Commit

Permalink
Merge branch 'master' into fix/relax_version_detection
Browse files Browse the repository at this point in the history
  • Loading branch information
trocher committed Nov 19, 2024
2 parents 926846e + e5eb199 commit e2f7215
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/vyperlang/vvm/)
### Changed
- Update contact information in `CONTRIBUTING.md`
- Update contact information in `CONTRIBUTING.md` ([#17](https://github.com/vyperlang/vvm/pull/17), [#18](https://github.com/vyperlang/vvm/pull/18))
- Update dependencies. Minimum python version is now 3.8 ([#22](https://github.com/vyperlang/vvm/pull/22))
- Add `output_format` argument to `compile_source` and `compile_files` ([#21](https://github.com/vyperlang/vvm/pull/21))
- New public function `detect_vyper_version_from_source` ([#23](https://github.com/vyperlang/vvm/pull/23))
- Fix `combine_json` for versions `>0.3.10` ([#29](https://github.com/vyperlang/vvm/pull/29))
- Relax version detection checks ([#30](https://github.com/vyperlang/vvm/pull/30))

## [0.1.0](https://github.com/vyperlang/vvm/tree/v0.1.0) - 2020-10-07
Expand Down
1 change: 1 addition & 0 deletions tests/test_compile_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def test_compile_source(foo_source, vyper_version):
pytest.skip("vyper 0.4.0b1 to 0.4.0b5 have a bug with combined_json")
output = vvm.compile_source(foo_source)
assert "<stdin>" in output
assert "bytecode" in output["<stdin>"]


def test_compile_files(foo_path, vyper_version):
Expand Down
4 changes: 4 additions & 0 deletions vvm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ def compile_source(
)

if output_format in ("combined_json", None):
# Vyper 0.4.0 and up puts version at the front of the dict, which breaks
# the `list(compiler_data.values())[0]` on the next line, so remove it.
# Assumes the source file is not named `version` (without extension)
compiler_data.pop("version", None)
return {"<stdin>": list(compiler_data.values())[0]}
return compiler_data

Expand Down

0 comments on commit e2f7215

Please sign in to comment.