Questions tagged [codegen]

Use codegen for questions related to language features or tools which facilitate translating code between languages or creating code from metadata

References

242 questions
0
votes
1 answer

dart tools error using build_runner on github actions

locally the command flutter pub run build_runner build --delete-conflicting-outputs works fine, but in github actions w/ melos throws Unhandled exception: Bad state: Unable to generate package graph, no…
Francesco Iapicca
  • 2,618
  • 5
  • 40
  • 85
0
votes
1 answer

How to handle Postgres HStore type with Rust Cornucopia

When using Cornucopia to generate Rust structs from a managed Postgres database I get the following error: this query contains an unsupported type (name: identities, type: hstore) We have a few rows like this in our database and it would be great…
Asleepace
  • 3,466
  • 2
  • 23
  • 36
0
votes
2 answers

Error : ModuleNotFoundError: No module named 'packaging

I am trying to run this repository: https://github.com/facebookresearch/CodeGen I tried running it on both Windows and Ubuntu, but I am facing same error in both when I run this command present in install_env.sh. pip install -v…
Meg
  • 88
  • 1
  • 8
0
votes
0 answers

using codegen in nextjs 13 serverside

hey guys I had recently migrate to nextjs 13 and I'm trying to use codegen for graphql requests in serverside. Is anyone have an idea how to use codegen in next js 13 serverside or is there anything like codegen for my case?
sajadgnf
  • 13
  • 4
0
votes
0 answers

facing error of react-codegen and build failed

Facing build error, using below versions Xcode: 14.3.1 react-native: "0.70.6", ruby 2.7.5p203 Node: 20.3.1 [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/xBnnN.png
0
votes
0 answers

Problem with Typescript (React-Native) TypeError: Cannot read properties of undefined (reading 'typeAnnotation')

When I am trying to build my React Native (0.71.8 on New Arch) App with npx react-native run-android or when I am generating code with codegen from my android folder with ./gradlew generateCodegenArtifactsFromSchema --rerun-tasks I encounter this…
Rémi
  • 1
  • 4
0
votes
0 answers

How can the generated codegen query be minimized to its parent interface only?

I am working on graphql-codegen I have this graphql query export const QUERY=gql` query fetchView($workId: String!, $dataType: String, $lockedDTO: LockedDTOInput!) { fetchView (workId: $workId) { id } }`; any my resulting query is export…
0
votes
2 answers

TypeScript Types conflict with graphql types

I have a GraphQL resolver and schema that look like this: import { Resolvers } from "../../generated/schema"; export const resolvers: Resolvers = { Query: { getS: async (_parent: unknown, { id }: { id: string }): Promise>…
Owen Murphy
  • 153
  • 1
  • 10
0
votes
0 answers

URQL: Union type field in an un-keyable entity gets wrong typename from the union

So I have this fragment fragment fullOption on Option { selectId type options { ... on NumberArray { values } ... on CustomNumberArray { id name values } } } All of the Option, NumberArray and…
gk32001
  • 1
  • 1
0
votes
0 answers

Sympy: Code generation for dynamic size arrays

I am using Sympy for code generation. I would like to figure out the boundaries of what Sympy can do with respect to code generation for dynamically sized arrays. Let's say I would like to generate a simple element-wise multiplication…
lysgaard
  • 133
  • 5
0
votes
1 answer

Invoke a method based on argument with byte buddy

I have the following interface public interface DatabaseClient { void save(Entity entity, Consumer callback); void load(long id, Consumer callback); } and an implementation of this interface called DatabaseClientImpl. I used…
JeffreyH
  • 31
  • 5
0
votes
1 answer

In playwright I used codegen to generate code, to test a login page, I copied the code to visual studio, and ran the code in powershell. But it isn't

I was practicing with playwright, I need to test a login page, using powershell I installed playwright, I'm using dotnet 7, visual studio 2022, I used codegen and generated code by recording in the Inspector. I copied the code and pasted in the code…
Disni
  • 1
  • 1
0
votes
1 answer

Graphql Codegen giving name `CreateWithdrawLinkDocument` is defined multiple times error

I have setup Graphql codegen with next.js/react and ran the codegen file which generated code for typescript types however when I treed running my next.js application it gave name `MySomeDocument` is defined multiple times error. this is my codegen…
zeak
  • 13
  • 3
0
votes
0 answers

How can I configure cxf-codegen-plugin to use log4j?

org.apache.cxf cxf-codegen-plugin 3.3.0 org.slf4j
0
votes
1 answer

Confusion about generating intermediate code for control-of-flow statements in the dragon book

Section 6.6.3 of the dragon book (Compilers: Principles, Techniques, and Tools 2nd Edition) describes how to translate the flow-of-control statements like if/if-else/while into intermediate code. For example, The translation of if (B) S1 consists…
hengxin
  • 1,867
  • 2
  • 21
  • 42