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

feat: gno test support external pkgs #682

Closed
wants to merge 1 commit into from

Conversation

harry-hov
Copy link
Contributor

@harry-hov harry-hov commented Mar 31, 2023

Also look for pkg/realm in GNOHOME (pkgs fetched from chain via mod download)

Now developers can run gno mod download before gno test to support packages that are not part of /examples directory

@harry-hov harry-hov requested a review from a team as a code owner March 31, 2023 12:34
Makefile Outdated
@@ -46,6 +46,8 @@ install_gnokey:
install_gnodev:
@echo "Installing gnodev"
go install ./cmd/gnodev
@echo "Copying stdlibs"
rsync -ur stdlibs $${HOME}/.gno
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about embedding stdlibs in binary with go:embed?

@@ -114,7 +123,7 @@ func execTest(cfg *testCfg, args []string, io *commands.IO) error {

// guess opts.RootDir
if cfg.rootDir == "" {
cfg.rootDir = guessRootDir()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this :)

cmd/gnodev/util.go Outdated Show resolved Hide resolved
@moul
Copy link
Member

moul commented Apr 3, 2023

TLDR is:

  • we want to remove --root-dir (git clone guessing)
  • downloading stdlibs VS embedding stdlibs?

@harry-hov harry-hov changed the title [RFC][WIP] feat(gnodev): test support for external contracts [RFC][WIP] feat(gnovm/cmd): test support for external pkgs Apr 6, 2023
@harry-hov harry-hov marked this pull request as draft April 18, 2023 17:27
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Jun 20, 2023
@moul moul mentioned this pull request Aug 1, 2023
7 tasks
@moul
Copy link
Member

moul commented Aug 1, 2023

@harry-hov can you checkout #1014, I think you should collaborate to make your work merged.

@gfanton
Copy link
Member

gfanton commented Aug 2, 2023

It may be a small detail, but based on the go env command, might it make more sense to call these two variables GNOPATH (for containing dependencies) and GNOROOT (for containing gno, tool, and stdlib) to achieve better symmetry with Go's naming conventions? While the GOPATH name might seem less relevant with the adoption of Go modules, it's still the place for storing Go dependencies. I may be wrong, but I believe it would feel more natural for newcomers to encounter GNOPATH and GNOROOT instead of GNO_HOME and GNO_ROOT. Even though GNO_HOME does make sense, the proposed names would align more closely with established patterns in the Go community.

harry-hov added a commit that referenced this pull request Aug 10, 2023
Fix bug where `gno test` command doesn't recognize 
`_test.gno`/`_filetest.gno` file if directly passed as arg.

Fixes another bug where `gno test` avoids absolute path in arguments.

Note: This PR may contain some code that will be used to support future
PR like #682 and PR that I will open after this to support patterns in
arg.
Doozers pushed a commit to Doozers/gno that referenced this pull request Aug 31, 2023
…ng#945)

Fix bug where `gno test` command doesn't recognize 
`_test.gno`/`_filetest.gno` file if directly passed as arg.

Fixes another bug where `gno test` avoids absolute path in arguments.

Note: This PR may contain some code that will be used to support future
PR like gnolang#682 and PR that I will open after this to support patterns in
arg.
@moul moul added this to the 🌟 main.gno.land (wanted) milestone Sep 8, 2023
@harry-hov harry-hov changed the title [RFC][WIP] feat(gnovm/cmd): test support for external pkgs [RFC][WIP] feat: gno test support external pkgs Sep 11, 2023
Copy link

codecov bot commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.74%. Comparing base (555357e) to head (bdcaa37).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #682   +/-   ##
=======================================
  Coverage   46.74%   46.74%           
=======================================
  Files         492      492           
  Lines       69616    69605   -11     
=======================================
- Hits        32542    32539    -3     
+ Misses      34363    34354    -9     
- Partials     2711     2712    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@harry-hov harry-hov changed the title [RFC][WIP] feat: gno test support external pkgs feat: gno test support external pkgs May 6, 2024
Look for downloaded packages in GNOHOME
@harry-hov harry-hov marked this pull request as ready for review June 3, 2024 14:59
@Kouteki Kouteki marked this pull request as draft June 12, 2024 14:58
@Kouteki Kouteki assigned Kouteki and unassigned harry-hov Jun 14, 2024
@thehowl
Copy link
Member

thehowl commented Oct 28, 2024

Closing as draft for 1yr+. Also, I think it's misguided to begin with.

@thehowl thehowl closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Status: 🌟 Wanted for Launch
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants