Skip to content

Improve parsing for git URLs when adding third party CUE modules #2631

Closed

Description

@helderco

What are you trying to do?

The current design for fetching repos is very limiting. We're parsing a URL into repo and path, but current design assumes 2 parts for the repo and rest for the path.

For example, the URL gitlab.com/dagger/dagger/stdlib/test/test gets parsed into:

  • Repository: github.com/dagger/dagger
  • Path: /stdlib/test/test

I think it's more flexible to require a .git separator in the URL to get the path after it, otherwise making the full URL the repository.

Examples:

URL Repository Path
gitlab.com/dagger/dagger/stdlib/test/test gitlab.com/dagger/dagger/stdlib/test/test
gitlab.com/dagger/dagger/stdlib/test/test.git gitlab.com/dagger/dagger/stdlib/test/test
gitlab.com/dagger/dagger/stdlib/test.git/test gitlab.com/dagger/dagger/stdlib/test /test

Why is this important to you?

GitLab is well adopted and you can create arbitrary depth on the repo path because of sub-groups.

There's an issue already for general improvements on this but we need to expedite this specific fix because there's users blocked by the current design.

How are you currently working around this?

There's no workaround apart from managing this manually, skipping writing to dagger.mod and dagger.sum. It's possible to use a git submodule instead, inside cue.mod/pkg.

Activity

  1. changed the title [-]Improve parsing for git URLs when adding third party modules to project[/-] [+]Improve parsing for git URLs when adding third party CUE modules[/+] on Dec 21, 2022
  2. TomChv commented on Oct 31, 2023

    @TomChv
    Member

    I'm closing this issue since we are no longer working on CUE modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions