-
Notifications
You must be signed in to change notification settings - Fork 259
fix(3384): tailcall CLI command not recognized #3396
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,7 @@ opentelemetry-appender-tracing = { version = "0.4.0" } | |
opentelemetry-prometheus = "0.16.0" | ||
phonenumber = "0.3.4" | ||
chrono = "0.4.38" | ||
async-graphql-extension-apollo-tracing = { version = "3.2.15"} | ||
async-graphql-extension-apollo-tracing = { git = "https://github.com/Anshgrover23/async_graphql_apollo_studio_extension", rev = "d89ea0588552c8eb10b7169c012ff3613970126c" } | ||
headers = { workspace = true } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have already done a PR upstream to fix the issue async-graphql/async_graphql_apollo_studio_extension#194 |
||
http = { workspace = true } | ||
mime = "0.3.17" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env node | ||
|
||
import {familySync, GLIBC, MUSL} from "detect-libc" | ||
import {spawn} from "child_process" | ||
import path from "path" | ||
import {fileURLToPath} from "url" | ||
|
||
const filename = fileURLToPath(import.meta.url) | ||
const dirname = path.dirname(filename) | ||
const rootDir = path.resolve(dirname, "..") | ||
|
||
const platform = process.platform | ||
const arch = process.arch | ||
|
||
const libcFamily = familySync() | ||
let libc | ||
if (platform === "win32") { | ||
libc = "-msvc" | ||
} else { | ||
libc = libcFamily === GLIBC ? "-gnu" : libcFamily === MUSL ? "-musl" : "" | ||
} | ||
|
||
const pkg = `@tailcallhq/core-${platform}-${arch}${libc}` | ||
const binaryPath = path.join(rootDir, "node_modules", pkg, "bin", platform === "win32" ? "tailcall.exe" : "tailcall") | ||
|
||
try { | ||
const child = spawn(binaryPath, process.argv.slice(2), { | ||
stdio: "inherit", | ||
shell: true, | ||
}) | ||
|
||
child.on("error", (err) => { | ||
console.error(`Failed to execute tailcall: ${err.message}`) | ||
process.exit(1) | ||
}) | ||
|
||
child.on("exit", (code) => { | ||
process.exit(code ?? 1) | ||
}) | ||
} catch (error) { | ||
console.error(`Failed to execute tailcall: ${error.message}`) | ||
process.exit(1) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,8 @@ async function genPlatformPackage() { | |
cpu: [cpu], | ||
} | ||
|
||
if (libc) platformPackage.libc = [libc] | ||
// Only set libc for non-Windows platforms | ||
if (libc && os !== "win32") platformPackage.libc = [libc] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tusharmath , |
||
const packagePath = `@tailcallhq/core-${build}` | ||
const binPath = `${packagePath}/bin` | ||
|
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.
ubuntu 24 cause libc issues on older distro such as ubuntu 22
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.
@tusharmath see this
