Skip to content

feature: add sourcehut "forge" type#5564

Merged
rgrinberg merged 1 commit intomainfrom
ps/rr/feature__add_sourcehut__forge__type
Apr 14, 2022
Merged

feature: add sourcehut "forge" type#5564
rgrinberg merged 1 commit intomainfrom
ps/rr/feature__add_sourcehut__forge__type

Conversation

@rgrinberg
Copy link
Copy Markdown
Member

No description provided.

@rgrinberg rgrinberg requested a review from emillon April 9, 2022 01:00
@rgrinberg rgrinberg force-pushed the ps/rr/feature__add_sourcehut__forge__type branch from 711f057 to 4667f3b Compare April 9, 2022 01:00
match t.kind with
| Sourcehut -> assert false
| Bitbucket | Github -> "/issues"
| Gitlab -> "/-/issues")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The current implementation is fine, but I wonder if this would be even simpler to inline the intermediate abstractions and do a "plain" pattern matching. There will be some duplication, but the various hosts we support are already slightly different.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There's a way to factor this stuff out better most certainly. I did not try very hard I admit.

@rgrinberg rgrinberg added this to the 3.1.0 milestone Apr 11, 2022
@rgrinberg
Copy link
Copy Markdown
Member Author

ping @emillon needs an approval

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

ps-id: 06A1825D-D6F9-425E-BFD5-38A953F1C27B
@rgrinberg rgrinberg force-pushed the ps/rr/feature__add_sourcehut__forge__type branch from 4667f3b to 54c7019 Compare April 14, 2022 18:08
@rgrinberg rgrinberg merged commit 54c7019 into main Apr 14, 2022
@rgrinberg rgrinberg deleted the ps/rr/feature__add_sourcehut__forge__type branch April 14, 2022 18:08
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Apr 15, 2022
…ne-site, dune-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info and dune-action-plugin (3.1.0)

CHANGES:

- Add `sourcehut` as an option for defining project sources in dune-project
  files. For example, `(source (sourcehut user/repo))`. (ocaml/dune#5564, @rgrinberg)

- Add `dune coq top` command for running a Coq toplevel (ocaml/dune#5457, @rlepigre)

- Fix dune exec dumping database in wrong directory (ocaml/dune#5544, @bobot)

- Always output absolute paths for locations in RPC reported diagnostics
  (ocaml/dune#5539, @rgrinberg)

- Add `(deps <deps>)` in ctype field (ocaml/dune#5346, @bobot)

- Add `(include <file>)` constructor to dependency specifications. This can be
  used to introduce dynamic dependencies (ocaml/dune#5442, @anmonteiro)

- Ensure that `dune describe` computes a transitively closed set of
  libraries (ocaml/dune#5395, @esope)

- Add direct dependencies to $ dune describe output (ocaml/dune#5412, @esope)

- Show auto-detected concurrency on Windows too (ocaml/dune#5502, @MisterDA)

- Fix operations that remove folders with absolute path. This happens when
  using esy (ocaml/dune#5507, @EduardoRFS)

- Dune will not fail if some directories are non-empty when uninstalling.
  (ocaml/dune#5543, fixes ocaml/dune#5542, @nojb)

- `coqdep` now depends only on the filesystem layout of the .v files,
  and not on their contents (ocaml/dune#5547, helps with ocaml/dune#5100, @ejgallego)

- The mdx stanza 0.2 can now be used with `(implicit_transitive_deps false)`
  (ocaml/dune#5558, fixes ocaml/dune#5499, @emillon)

- Fix missing parenthesis in printing of corresponding terminal command for
  `(with-outputs-to )` (ocaml/dune#5551, fixes ocaml/dune#5546, @Alizter)
@mro
Copy link
Copy Markdown

mro commented Feb 24, 2023

@rgrinberg do I read the code correct, the source stanza is limited to hardcoded platforms? How would I enter an arbitrary url into an opam file - by dune-project or would I rather just write it by hand?

@rgrinberg
Copy link
Copy Markdown
Member Author

How would I enter an arbitrary url into an opam file - by dune-project or would I rather just write it by hand?

I think you need the set all the fields individually. Url, homepage, etc. The source stanza is just there to make setting all those fields at once possible.

@mro
Copy link
Copy Markdown

mro commented Feb 24, 2023

@emillon
Copy link
Copy Markdown
Collaborator

emillon commented Mar 6, 2023

@mro you don't have to use a template for this, the following should work:

(homepage Seppo.Social)
(bug_reports Seppo.Social/issues)
(source (uri Seppo.Social/sourcecode))

@mro
Copy link
Copy Markdown

mro commented Mar 9, 2023

nice, but it looks I need the template for the tags.

@emillon
Copy link
Copy Markdown
Collaborator

emillon commented Mar 9, 2023

Tags are supported, they'll be sourced from (tags) as you'd expect.

@mro
Copy link
Copy Markdown

mro commented Mar 9, 2023

failed for me:

$ dune build
File "dune-project", line 17, characters 1-5:
17 | (tags Social Web "#Fediverse" ActivityPub CGI RFC3875 RFC4287 RFC5005 RFC7033)
      ^^^^
Error: Unknown field tags

@emillon
Copy link
Copy Markdown
Collaborator

emillon commented Mar 9, 2023

I think it needs to be in the (package) itself.

@mro
Copy link
Copy Markdown

mro commented Mar 9, 2023

@mro
Copy link
Copy Markdown

mro commented Mar 9, 2023

it appears a bit inconsequent that entries end up next to each other but one can be specified outside (package) while the other has to be within.

@emillon
Copy link
Copy Markdown
Collaborator

emillon commented Mar 9, 2023

Yeah I agree it's not ideal. The reasoning is that things like source, author, maintainer are global to the project but tags are specific to each package. But I think that adding a global version of (tags) is a reasonable feature request too.

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

Successfully merging this pull request may close these issues.

3 participants