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

fix(2694): tailcall server run via npx command #2733

Merged
merged 10 commits into from
Sep 25, 2024

Conversation

webbdays
Copy link
Contributor

Summary:
fix the problem with package executable path

Issue Reference(s):
Fixes #2694

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • [ yes] I have performed a self-review of my code.
  • [ yes] PR follows the naming convention of <type>(<optional scope>): <title>

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Aug 18, 2024
@webbdays
Copy link
Contributor Author

@tusharmath
Please review.

@webbdays
Copy link
Contributor Author

make sure build-matrix is latest when merged.

@tusharmath tusharmath changed the title fix: tailcall server run via npx command (npx @tailcallhq/tailcall) #2694 fix(2694): tailcall server run via npx command Aug 26, 2024
Copy link
Contributor

@tusharmath tusharmath left a comment

Choose a reason for hiding this comment

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

@webbdays, can you describe how this PR will fix the above issue? There are quite a few changes that don't seem relevant in the first glance. Is there a way you can create a smaller PR with just the requried changes.

@webbdays
Copy link
Contributor Author

@tusharmath
root cause: cannot find a executable.
reason: we are installing another package within a package.
so the package name is different.
binary for tailcall is in platform specific package bin/ folder.
where as when using with npx, it is trying to find the executable in tailcall/bin/ which we dont have.
so error.

So, what i am doing is instead of installing package within a package, we install only one package and we get the platform specific binary from the github releases and place it in tailcall/bin/
here after any tools can find it.
be it npx, npm.

Copy link

github-actions bot commented Sep 1, 2024

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Sep 1, 2024
@github-actions github-actions bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Sep 1, 2024
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.84%. Comparing base (dbf10b4) to head (47f2c79).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2733   +/-   ##
=======================================
  Coverage   87.84%   87.84%           
=======================================
  Files         263      263           
  Lines       26252    26252           
=======================================
  Hits        23061    23061           
  Misses       3191     3191           

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

@tusharmath
Copy link
Contributor

Overall the PR looks fine to me. CI is failing. Can you check and debug this issue? Moving to draft to reduce noise and improve CI efficiency. Once you are ready just mark it as "ready to review". Feel free to give a shoutout on the #contributors channel on Discord if you want immediate attention.

@tusharmath tusharmath marked this pull request as draft September 7, 2024 04:09
@webbdays
Copy link
Contributor Author

webbdays commented Sep 8, 2024

ok. checking the issue.

@webbdays
Copy link
Contributor Author

webbdays commented Sep 8, 2024

ci is failing on code in main.
this pr didnt touch rust.

@webbdays webbdays marked this pull request as ready for review September 10, 2024 17:19
@webbdays
Copy link
Contributor Author

webbdays commented Sep 10, 2024

@tusharmath
ready for review.

Copy link

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions bot added state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. and removed state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. labels Sep 17, 2024
Copy link

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Sep 22, 2024
@tusharmath tusharmath enabled auto-merge (squash) September 25, 2024 11:51
@tusharmath tusharmath merged commit 04e7a6a into tailcallhq:main Sep 25, 2024
33 checks passed

let libc = ""
if (os === "win32") {
libc = "msvc"
Copy link
Collaborator

Choose a reason for hiding this comment

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

why have we dropped the - here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently implementation doest need it.

Comment on lines +7 to +14
const libcFamily = familySync()

let libc = ""
if (os === "win32") {
libc = "msvc"
} else {
libc = libcFamily === GLIBC ? "gnu" : libcFamily === MUSL ? "musl" : ""
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

duplicate code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes.
we can make a function inside utils.

tusharmath added a commit that referenced this pull request Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. type: fix Iterations on existing features or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: the npx command doesn't work
3 participants