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

Can't generate the clients from a fresh repository #79

Open
5 tasks done
PHBourquin opened this issue Oct 18, 2023 · 9 comments
Open
5 tasks done

Can't generate the clients from a fresh repository #79

PHBourquin opened this issue Oct 18, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@PHBourquin
Copy link

Checklist

Environment

  • Node Version: v18.18.2
  • NPM Version: 10.2.0

Tried under both windows & ubuntu distribution

Goals

Successfully run the README.md steps from a fresh repository

Expected Results

Generate the clients !!

Actual Results

Failure when running npm run build command. Getting "src/ doesn't exist" error message instead.

Since 12eef67, it seems this folder does not exist anymore and there is no CodeGenerator.js file to be found anywhere in the repository.

Am I missing something very obvious or is there an actual issue? Thanks for your help!!

Steps to Reproduce

$ npm install
up to date in 2s

$ npm run build

> [email protected] build
> babel src/ -d lib/

src/ doesn't exist
@PHBourquin PHBourquin added the bug Something isn't working label Oct 18, 2023
@stcheng
Copy link
Contributor

stcheng commented Oct 18, 2023

@PHBourquin we're aware of this issue and working on a mitigation. may i ask if you are debugging the codegen procedure from spec to per language code? what is the use case here?

@Aerion
Copy link

Aerion commented Oct 18, 2023

Thanks for your quick response!

what is the use case here?

We would be interested in trying out adding support for another language (C#), instead of having to maintain our own Meta API client, which requires manual change at each Meta API version upgrade.

working on a mitigation

If you have any procedure, even if it requires to do multiple steps or hacks, we'd really appreciate if you could share it, as we'd like to dedicate some effort to implement this new client on our side.

@stcheng
Copy link
Contributor

stcheng commented Oct 18, 2023

@Aerion thank you so much for sharing this information. I noticed that there were previously some csharp related work that is halfway done. I could try to post this portion of codebase out so that we could resume it and later to create a separate repo for csharp support. Will this be something you are interested in?

@Aerion
Copy link

Aerion commented Oct 18, 2023

Will this be something you are interested in?

Definitely!

For the context, we're having some kind of hackathon right now, and we have the coming days available for where we were hoping to do the C# client, and according to the results, propose our work as a PR.

We weren't expecting the build issue. Our thought process was to:

  1. Build this repo locally, to confirm that we can generate the clients of other languages locally
  2. Then start with a csharp folder and have a simple GET of a route working
  3. Iterate over the implementation until we have something working

By ourselves, we're stuck on the first step, so if there is some structure already with csharp support, we'd be interested in it.
On the other hand, having the procedure to build the existing clients would also unlock us, as we'd be able to start on the csharp support too.

To recap, we're open to anything that would enable us to advance on the csharp support :)

@stcheng
Copy link
Contributor

stcheng commented Oct 18, 2023

@Aerion got it. let me do some preparations to help on this. I might not have bandwidth on checking the correctness but I could publish 1) the codegen lib 2) csharp mustache template very soon.

@stcheng
Copy link
Contributor

stcheng commented Oct 19, 2023

@Aerion could you locally patch this PR #80 i believe this contains something that hopefully could help you. basically right now babel is broken but you could still generate via codegen script.

@PHBourquin
Copy link
Author

Hello, thanks a lot for the feedback and sharing this PR!

Indeed it needs a bit of tweaking, I'll take it from here. And we are definitely interested in the C# portion, thanks for this too!

@PHBourquin
Copy link
Author

Small update on the topic FYI, making good progress with https://github.com/PHBourquin/facebook-business-sdk-codegen/tree/csharp-draft with a basic implementation for C# clients.

As we move toward a clean PR, I'd like to have your opinion on how should we proceed regarding the current state of the repository with babel & lib/ files, as they are affected by my changes. If we can get back the repository to a clean "default" state to push C# implem on top of it 🙂

In the meantime, feel free to have a glance at the C# implem itself if you are curious!

@PHBourquin
Copy link
Author

Gentle ping, any chance of getting the repository back on track ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants