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

Fix lint W59 with a local path that is not an archive #6219

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented Oct 1, 2024

fix #6218

@rjbou rjbou added the KIND: BUG label Oct 1, 2024
@rjbou rjbou added this to the 2.3.0~alpha2 milestone Oct 1, 2024
@rjbou rjbou requested a review from kit-ty-kate October 1, 2024 09:48
@rjbou rjbou changed the title Fiw lint W59 Fix lint W59 with a local path that is not an archive Oct 1, 2024
tests/reftests/lint.test Outdated Show resolved Hide resolved
### <add-url.sh>
basedir=$(echo $BASEDIR | sed "s/\\\\\\\\/\\\\\\\\\\\\\\\\/g")
cat << EOF >> lint.opam
url { src:"file://$basedir/an-archive" }
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure to understand the issue. The an-archive directory doesn't exists at this point right? Shouldn't we raise a warning here for this?

tests/reftests/lint.test Outdated Show resolved Hide resolved
let url_archive =
let open OpamStd.Option.Op in
t.url >>| OpamFile.URL.url >>| (fun u ->
OpamSystem.is_archive u.OpamUrl.path)
Copy link
Member

Choose a reason for hiding this comment

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

i don't think that's right. is_archive will look up the file locally. If you have an url like https:///etc/fstab, the path will be looked up.

@rjbou rjbou modified the milestones: 2.3.0~alpha2, 2.4.0~alpha1 Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint W59 warn for missing checksum on local directory source url
2 participants