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

Versioning does not work if not in the x.y.z format #10

Open
nomadplanet opened this issue Jul 7, 2021 · 3 comments
Open

Versioning does not work if not in the x.y.z format #10

nomadplanet opened this issue Jul 7, 2021 · 3 comments

Comments

@nomadplanet
Copy link

Given the following content in the Punfile

- FooBar:
  - name: FooBar
    version: 1.2

you get an error:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/punfile.rs:85:109
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

That only works if your dependency has the x.y.z version formatting

- FooBar:
  - name: FooBar
    version: 1.2.0

I think version should be a free-form string.

Also that does not make sense to have to specify the version number in the Punfile, it should be automatically done somehow. I know there's no strong adherence with Carthage, so it should do it with some kind of hashing of the .xcframework.

@nomadplanet
Copy link
Author

nomadplanet commented Jul 7, 2021

Also the documentation states that version should be - prefixed, which isn't true.

@DrewKiino
Copy link
Contributor

Great thanks for the feedback @nomadplanet, we're trying not to be dependent of Carthage's .resolved files, at least not exclusively which is why the Punfile is regarded as the source of truth for what dependencies are downloaded. Although the best way is to look at the .resolved file to automatically determine the versioning and we can add that as an optional instead of using Punfile to determine versions. The hashing of the .xcframework can work as well but you would need to keep track of the hashes per framework to determine what to download since there's no human readable format behind such mapping.

We will definitely try to fix this for the next release.

@jesus-mg-ios
Copy link

@DrewKiino any news?

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

No branches or pull requests

3 participants