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

Make API Codegen Work on Linux #255

Merged

Conversation

ckadner
Copy link
Member

@ckadner ckadner commented Nov 6, 2021

Code Changes:

  • Use a platform-specific gsed alias in api/codegen.sh script
  • Delete duplicated api/add_license_headers.sh script
  • Move existing helper scripts from /hack to /tools
  • Remove .travis.yml and git_push.sh from API code generation

Resolves #254

Additional Information:

Use Docker for testing using Linux/Ubuntu for developers using macOS:

  • Create a Dockerfile like this:
FROM ubuntu:latest

RUN apt-get -y update
RUN apt-get -y install git
RUN apt-get -y install make
RUN apt-get -y install curl
RUN apt-get -y install wget

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y install default-jre-headless

RUN apt-get clean && rm -rf /var/lib/apt/lists/*
  • Build the image and run the container:
docker build -t ubuntu-make-curl-git-java .
docker run -it ubuntu-make-curl-git-java /bin/bash
  • Inside the container, run the api/codegen.sh script:
git clone https://github.com/ckadner/mlx.git
cd mlx
git checkout fix_codegen_on_linux
./api/codegen.sh
git status

Note:: the api/generate_code.sh script will only work after this PR got merged, since it relies on comparing current codegen results with those of a previous (latest) commit from main (which will not yet have the fix).

* Use a 'gsed' alias in /api/codegen.sh script
* Delete duplicated /api/add_license_headers.sh script
* Move existing helper scripts from /hack to /tools
* Remove .travis.yml and git_push.sh from API code generation

Resolves machine-learning-exchange#254

Signed-off-by: Christian Kadner <[email protected]>
@ckadner ckadner added the API Swagger API label Nov 6, 2021
@ckadner ckadner self-assigned this Nov 6, 2021
@mlx-bot
Copy link
Collaborator

mlx-bot commented Nov 6, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ckadner

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ckadner
Copy link
Member Author

ckadner commented Nov 8, 2021

@BluThaitanium -- this PR uses the same fix you provided last week in PR #250 -- Please review when you get a chance. Thanks!

@JAulet
Copy link
Contributor

JAulet commented Nov 8, 2021

/lgtm

@mlx-bot mlx-bot added the lgtm label Nov 8, 2021
@mlx-bot mlx-bot merged commit 442654b into machine-learning-exchange:main Nov 8, 2021
@ckadner
Copy link
Member Author

ckadner commented Nov 8, 2021

Thanks @JAulet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generating API doesn't work on WSL/Ubuntu
3 participants