Skip to content
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

Move _filetest.gno to filetests/* folder. #846

Open
jaekwon opened this issue May 24, 2023 · 8 comments · May be fixed by #1062
Open

Move _filetest.gno to filetests/* folder. #846

jaekwon opened this issue May 24, 2023 · 8 comments · May be fixed by #1062
Assignees
Labels
help wanted Want to contribute? We recommend these issues. 🧾 package/realm Tag used for new Realms or Packages. 🌟 improvement performance improvements, refactors ...

Comments

@jaekwon
Copy link
Contributor

jaekwon commented May 24, 2023

The _filetests clog the gno package directory; instead of _filetest.gno, we should move the files into a ./filetests/ folder, and remove the _filetest.gno file extension.

@jaekwon jaekwon added this to the 🏗X testX.gno.land (future) milestone May 24, 2023
@ajnavarro ajnavarro added 🧾 package/realm Tag used for new Realms or Packages. 🌟 improvement performance improvements, refactors ... labels May 30, 2023
@harry-hov harry-hov self-assigned this Jul 17, 2023
@moul
Copy link
Member

moul commented Aug 21, 2023

@harry-hov whats the current state, did you start?

I think it could be a good task for @gfanton yo complete his onboarding on the VM + CLI parts of the project.

@gfanton
Copy link
Member

gfanton commented Aug 22, 2023

it doesn't looks too complicated at first glance, I can try to do this, but maybe @harry-hov already have something

@gfanton gfanton linked a pull request Aug 22, 2023 that will close this issue
10 tasks
@gfanton
Copy link
Member

gfanton commented Aug 22, 2023

I've initiated a small pull request #1062. It seems to work naturally by simply adding filetest files from the filetests directory to the subpkg without any extra steps.
A few quick questions that come to mind:

  • Can the filetests folder contain _test.gno files or any other special files that is not a filetest, (like a gno.mod)?
  • Are subdirectories allowed in this folder? If so, what happens if a filetests subdirectory is present within that folder?
  • Should we support both (_filetest file and filetests directory) ?

@harry-hov
Copy link
Contributor

it doesn't looks too complicated at first glance, I can try to do this, but maybe @harry-hov already have something

I started working on that with my another work about publishing subdirs.
Since we are moving the _filetest.gno files to subdir(/filetests), due to this change, they will not be published to the chain. So i waited to finish work on publishing subdirs before making this change.

I followed a similar approach to what you did in your PR #1062. I cherry-picked and pushed my commit here(harry-hov@dfe2e8b) just in case if you want to take a look

@gfanton
Copy link
Member

gfanton commented Aug 28, 2023

@harry-hov Is this feature truly dependent on publishing subdir? Given that filetests are not executed on-chain (yet?), can we not handle this separately?

@harry-hov
Copy link
Contributor

@harry-hov Is this feature truly dependent on publishing subdir?

Not exactly. I would just like to have that feature first.

But TBH. i have no preference. if your PR is ready we can go ahead with this change first (considering we are okay with not publishing filetests on chain)

@moul moul moved this to 🔵 Not Needed for Launch in 🚀 The Launch [DEPRECATED] Sep 5, 2023
@thehowl
Copy link
Member

thehowl commented Jan 26, 2024

See-also: #1346 as an alternative. As a more radical approach, but I think better in the long term, I propose removing filetests for end users altogether :)

@moul
Copy link
Member

moul commented Apr 18, 2024

I suggest doing the opposite by allowing them and adding support for txtar testing as well. Allowing this doesn't imply favoring them over standard unit tests. It aims to make it easier for users needing this feature to work outside the main monorepo. The goal is to allow creating a standalone repository with .gno files, _test.gno files, and a subfolder for advanced tests, catering to advanced users.

cc @gfanton

@Kouteki Kouteki added help wanted Want to contribute? We recommend these issues. and removed help wanted labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Want to contribute? We recommend these issues. 🧾 package/realm Tag used for new Realms or Packages. 🌟 improvement performance improvements, refactors ...
Projects
Status: 📥 Inbox
Status: 🔵 Not Needed for Launch
Development

Successfully merging a pull request may close this issue.

7 participants