Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify a github repo as the source of dependency of a module in Raku?

My module depends on the Fcntl module (https://github.com/manchicken/perl6-Fcntl), which hasn't been updated in a long time and is broken. However, there's a fork (https://github.com/jonathanstowe/perl6-Fcntl) that works for me if I zef install it manually. Is it possible to specify the dependency in my module's META-6.json such that the correct github repo will be used for installing the module?

like image 444
cowbaymoo Avatar asked Aug 13 '20 00:08

cowbaymoo


People also ask

How to use GitHub repository as a dependency in a package?

To use the GitHub repo as a dependency in your package.json, you can use the following syntax below: For public repositories, the syntax listed above works for all git based version control system such as GitLab, BitBucket, among others. 2. Using a Private Repository as a Dependency

How to use GitHub repository as an NPM dependency in React-Native?

Click on the Fork button on the right top corner of open-source GitHub repository git add . Now all the changes you want to make in the open-source library are there, the only thing remaining is to use this forked library as a dependency in your react native project. How to use GitHub repository as an npm dependency in a react-native?

Where should I place a module in a repository?

We recommend placing each module that is intended to be re-usable in the root of its own repository or archive file, but it is also possible to reference modules from subdirectories. Local path references allow for factoring out portions of a configuration within a single source repository.

How do I enable the dependency graph on my repository?

Under your repository name, click Settings . In the left sidebar, click Security & analysis . Read the message about granting GitHub read-only access to the repository data to enable the dependency graph, then next to "Dependency Graph", click Enable .


Video Answer


1 Answers

No, you cannot list a uri as a dependency. The spec actually states that dependency names in META6.json should match what you would use.

If you insist on not integrating the namespace into one of the many cooperative ecosystems then you are still free to list the urls in your installation instructions:

zef install MyModule https://github.com/foo/dependency.git

When a user provides a uri to zef it is essentially treated as a stand-alone ecosystem and thus is able to fulfill dependencies for MyModule. This is ok -- the user is explicitly requesting that source to be used. What is not ok is for module authors to dictate where dependencies are downloaded from (only what dependencies are needed).

All that said you can solve your problem a different way -- fork the module, change the auth field to something else, list (and use) Fcntl:auth<mynewauth> as the dependency name, and then add your fork to an ecosystem. Alternative you could just bump the version so-to-speak.

like image 68
ugexe Avatar answered Sep 28 '22 02:09

ugexe