Remove restriction on the project's package name

There are restrictions regarding how modules are called, but given that packages are tight to repositories anyway; there's no way someone can publish and use an aiken package on 'aiken-lang' without being part of the organization. So the restriction on the command-line is pointless. Plus, it prevents us from using 'aiken-lang' as a placeholder name for tutorials.
This commit is contained in:
KtorZ 2023-01-14 23:47:57 +01:00
parent 219e81cb75
commit d2c03b0094
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
2 changed files with 0 additions and 13 deletions

View File

@ -13,17 +13,6 @@ pub struct PackageName {
}
impl PackageName {
pub fn restrict(&self) -> Result<(), Error> {
if self.owner.starts_with("aiken") {
return Err(Error::InvalidProjectName {
reason: InvalidProjectNameReason::Reserved,
name: self.to_string(),
});
}
Ok(())
}
fn validate(&self) -> Result<(), Error> {
let r = regex::Regex::new("^[a-z0-9_-]+$").expect("regex could not be compiled");

View File

@ -29,8 +29,6 @@ pub fn exec(args: Args) -> miette::Result<()> {
}
fn create_project(args: Args, package_name: &PackageName) -> miette::Result<()> {
package_name.restrict().into_diagnostic()?;
let root = PathBuf::from(&package_name.repo);
if root.exists() {