-
Notifications
You must be signed in to change notification settings - Fork 375
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
fix: block subdirectories on realm packages #2155
base: master
Are you sure you want to change the base?
fix: block subdirectories on realm packages #2155
Conversation
if isRealm && file.IsDir() { | ||
// currently realm packages does not support subpackages https://github.com/gnolang/gno/issues/1041 | ||
panic("not supported yet") | ||
} | ||
if file.IsDir() || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at this check, we are already ignoring subdirectories.
I don't think panicking is a good idea.
There are many reasons why I want to have subdirectories in realms:
-
Nested Independent Realms:
Imagine I have two realms:
examples/gno.land/p/demo/foo
andexamples/gno.land/p/demo/foo/bar
.
Right now, I can publish both realms in two transactions. However, with these changes, I won't be able to publishfoo
since it containsbar
. -
Local Directories:
Imagine I have directories like
/tests
or/docs
that I don't want to publish but want to keep locally. I need to remove them to be able to publish realm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @harry-hov thanks for your review 👍
I don't think panicking is a good idea.
I think that is just what the issue ask us to do (maybe it not relevant anymore ?)
There are many reasons why I want to have subdirectories in realms:
Nested Independent Realms:
Imagine I have two realms: examples/gno.land/p/demo/foo and examples/gno.land/p/demo/foo/bar.
Right now, I can publish both realms in two transactions. However, with these changes, I won't be able to publish foo since it contains bar.
This should apply only for r Realms not for p Realms so you will be able to keep using the subdirectory on examples/gno.land/p/demo/foo
and examples/gno.land/p/demo/foo/bar
Local Directories:
Imagine I have directories like /tests or /docs that I don't want to publish but want to keep locally. I need to remove them to be able to publish realm.
I think you have a really good point here, maybe we will need to only block the subdirectories that contains any of *.gno
, gno.mod
files ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moul @zivkovicmilos WDYT about the panic comment? The initial issue has panic in the scope.
This PR is stale because it has been open 3 months with no activity. Remove stale label or comment or this will be closed in 3 months. |
closes #1041
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description