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

rename binary to tailcall & fix libc detection #634

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The below file is a standard `.graphQL` file, with a few additions such as `@ser
Now, run the following command to start the server with the full path to the jsonplaceholder.graphql file that you created above.

```bash
tc start ./jsonplaceholder.graphql
tailcall start ./jsonplaceholder.graphql
```

Head out to [docs] to learn about other powerful tailcall features.
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ chmod +x "$INSTALL_DIR/tailcall-${OS}-${ARCH}"

# Create symlinks in ~/.tailcall/bin
mkdir -p "$HOME/.tailcall/bin"
ln -sf "$INSTALL_DIR/tailcall-${OS}-${ARCH}" "$HOME/.tailcall/bin/tc"
ln -sf "$INSTALL_DIR/tailcall-${OS}-${ARCH}" "$HOME/.tailcall/bin/tailcall"

# Determine which shell the user is running and which profile file to update
if [[ "$SHELL" == *"zsh"* ]]; then
Expand Down
2 changes: 1 addition & 1 deletion npm/gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function genPlatformPackage() {
const binPath = `${packagePath}/bin`

const targetPath = ext ? `../target/${target}/release/tailcall${ext}` : `../target/${target}/release/tailcall`
const tcPath = ext ? `${binPath}/tc${ext}` : `${binPath}/tc`
const tcPath = ext ? `${binPath}/tailcall${ext}` : `${binPath}/tailcall`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const tcPath = ext ? `${binPath}/tailcall${ext}` : `${binPath}/tailcall`
const tcPath = `${binPath}/tailcall${ext || ''}`

the same applies to line 48.

If you want, feel free to create this variable with a default value instead

const packageJsonPath = `${packagePath}/package.json`
const readmePath = "../README.md"

Expand Down
9 changes: 3 additions & 6 deletions npm/post-install.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
// @ts-check
import { family, GLIBC, MUSL } from "detect-libc"
// @ts-ignore
import { familySync, GLIBC, MUSL } from "detect-libc"
import { exec } from 'child_process'
import util from 'util'

const execa = util.promisify(exec)
const platform = process.platform
const arch = process.arch

let libcFamily
family().then((fam) => {
libcFamily = fam
})

const libcFamily = familySync()
Copy link
Contributor

Choose a reason for hiding this comment

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

we can't use top-level await?

let libc
if (platform === "win32") {
libc = "-msvc"
Expand Down
2 changes: 1 addition & 1 deletion src/cli/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ABOUT: &str = r"
\__/\__,_/_/_/\___/\__,_/_/_/";

#[derive(Parser)]
#[command(name ="tc",author, version = VERSION, about, long_about = Some(ABOUT))]
#[command(name ="tailcall",author, version = VERSION, about, long_about = Some(ABOUT))]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
Expand Down
Loading