-
Notifications
You must be signed in to change notification settings - Fork 407
Remove dealing with descr and url files #6253
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
Draft
hannesm
wants to merge
5
commits into
ocaml:master
Choose a base branch
from
hannesm:remove-descr-url
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
612ff8c
OpamRepositoryPath.descr/url: remove
hannesm b43c23e
OpamPath: remove url & descr
hannesm fc6454e
Apply suggestions from code review
hannesm adb134e
opam-admin-top: remove descr & url
hannesm 9805cd4
remove the unused parts of OpamFile.Descr
kit-ty-kate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1297,44 +1297,9 @@ let add_aux_files ?dir ?(files_subdir_hashes=false) opam = | |
| match dir with | ||
| | None -> opam | ||
| | Some dir -> | ||
| let (url_file: OpamFile.URL.t OpamFile.t) = | ||
| OpamFile.make (dir // "url") | ||
| in | ||
| let (descr_file: OpamFile.Descr.t OpamFile.t) = | ||
| OpamFile.make (dir // "descr") | ||
| in | ||
|
Comment on lines
-1300
to
-1305
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. descr & url reading & handling should be moved to |
||
| let files_dir = | ||
| OpamFilename.Op.(dir / "files") | ||
| in | ||
| let opam = | ||
| match OpamFile.OPAM.url opam, try_read OpamFile.URL.read_opt url_file with | ||
| | None, (Some url, None) -> OpamFile.OPAM.with_url url opam | ||
| | Some opam_url, (Some url, errs) -> | ||
| if url = opam_url && errs = None then | ||
| log "Duplicate definition of url in '%s' and opam file" | ||
| (OpamFile.to_string url_file) | ||
| else | ||
| OpamConsole.warning | ||
| "File '%s' ignored (conflicting url already specified in the \ | ||
| 'opam' file)" | ||
| (OpamFile.to_string url_file); | ||
| opam | ||
| | _, (_, Some err) -> | ||
| OpamFile.OPAM.with_format_errors (err :: opam.format_errors) opam | ||
| | _, (None, None) -> opam | ||
| in | ||
| let opam = | ||
| match OpamFile.OPAM.descr opam, | ||
| try_read OpamFile.Descr.read_opt descr_file with | ||
| | None, (Some descr, None) -> OpamFile.OPAM.with_descr descr opam | ||
| | Some _, (Some _, _) -> | ||
| log "Duplicate descr in '%s' and opam file" | ||
| (OpamFile.to_string descr_file); | ||
| opam | ||
| | _, (_, Some err) -> | ||
| OpamFile.OPAM.with_format_errors (err :: opam.format_errors) opam | ||
| | _, (None, None) -> opam | ||
| in | ||
| let opam = | ||
| let extra_files = | ||
| OpamFilename.opt_dir files_dir >>| fun dir -> | ||
|
|
||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -331,12 +331,7 @@ let pinned_package st ?version ?(autolock=false) ?(working_dir=false) name = | |
| let save_overlay opam = | ||
| OpamFilename.mkdir overlay_dir; | ||
| let opam_file = OpamPath.Switch.Overlay.opam root st.switch name in | ||
| List.iter OpamFilename.remove | ||
| OpamPath.Switch.Overlay.([ | ||
| OpamFile.filename opam_file; | ||
| OpamFile.filename (url root st.switch name); | ||
| OpamFile.filename (descr root st.switch name); | ||
| ]); | ||
|
Comment on lines
-334
to
-339
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to myself:
|
||
| OpamFilename.remove (OpamFile.filename opam_file); | ||
| let files_dir = OpamPath.Switch.Overlay.files root st.switch name in | ||
| OpamFilename.rmdir files_dir; | ||
| let opam = | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still need them for upgrade functions. We can mark them as deprecated for use in external libraries, but opam lib need to keep for backward compatibility ftm.