Skip to content

Correct module names are not obvious #87

@tarsir

Description

@tarsir

Issue

Hello! I decided to start playing around with C3 yesterday and found this repo while looking for a starting point for Raylib.

After looking around at this repo's docs and those for C3, I expected that this sequence would build:

$ c3c vendor-fetch raylib55
# add an `import raylib55;` to my main source file
$ c3c build

But the build command reported that the library couldn't be found. I dug around some more and found an issue in this repo that showed me that the correct module name is raylib5, which allowed me to build. But, the only reference to that as the module name I could find is in its c3i file. It seems to be referred to as raylib55 pretty much everywhere else - the library name in project.json, the directory within the repo, etc.

I think it'd be beneficial for newcomers like myself to have this documented somehow and make sure all the libraries provided in this repo have that documentation.

Ideas

A Markdown table in the README.md would probably do just fine, along the lines of:

Library Fetch command Import statement
raylib55 c3c vendor-fetch raylib55 import raylib5::rl;
All other libs c3c vendor-fetch <library name> import <library name>

Ideally this could be auto-generated in CI by inspecting each directory's c3i files but that might be a significantly larger effort :)

Notes

I'd just like to add that I'm happy to do an initial PR for all the libs currently in the repo if there's no issues with this idea! And thanks for maintaining this repo!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions