-
Notifications
You must be signed in to change notification settings - Fork 94
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
[Feature] Package loader for amber #668
Comments
I think And Jura is what I tried just for fun. But I will patch to match some of the requirements. |
i wouldn't want to meddle with package versions, dependencies, and integrity checks on compiler level. i imagine it working like it is with node - a 3rd party app like also i think you have it a little bit confused - rust's compiler doesn't read cargo files. cargo is a totally independent program from rust's compiler |
i want to clarify that the purpose of this issue is not to create a package manager, but to create an interface for loading packages into the compiler. package management is not something that should be done by the compiler, but rather by a 3rd party program |
Oh, I am happy adding more location to search modules. Thank you. My opinions for details.
|
you mean
we do not have project root at all for now so i dont know how thats relevant. you do mean working directory, right? i just feel like that would cause way too much confusion about what is a package and what is a file in the working directory |
also i think that in files that are imported in a different directory than the first one, working directory should refer to the directory they are in. so if |
Thank you for the detailed explanation. I support your proposal. |
we would obviously need a package manager at some point.
i'd like to propose a system for loading packages on compiler level
with these package directories (i will refer to this as
$PKGDIR
from now on):./amber_modules
~/.local/amber_modules
/usr/lib/amber_modules
when importing a path that starts with a letter, compiler should import it from
$PKGDIR/package_name/main.ab
, with this logic:for importing files in the working directory, users should use
import "./local_file"
implementing this will allow for creating a package manager for amber, that would be maintained independently from compiler
this will also mean treating stdlib as a package, rather than as a hardcoded language feature
The text was updated successfully, but these errors were encountered: