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

Is frame-pointer necessary for riscv assembly?

I am working on a project which requires me to generate asm code from llvm ir. When I using llc to generate code directly from .ll file, the assembly doesn't have frame pointer fp. However, when I use the riscv-unknow-elf-gcc to compile .cpp file,…
hnyls2002
  • 103
  • 8
0
votes
2 answers

DataStore - Models were generated with an unsupported version of codegen

I have a form where some values are taken and at the end some images are added through expo image picker. All of those informations are to be uploaded to AWS amplify so upon importing the models I suddenly receive a weird error I haven't seen before…
Laspeed
  • 791
  • 1
  • 5
  • 27
0
votes
0 answers

OpenApi Grouping Operations without tagging each path

Issue We generate sources from an openApi specification (into java via gradle plugin) and it would be very convenient to specify the target class name in another way than tagging each path individually (like mentioned in their docs). Goal Ideally,…
BorisP
  • 23
  • 1
  • 3
0
votes
0 answers

NSWAG Generated code including property called System conflicting with namespace

I have a 3rd party open API spec that I have no control over. I am generating a c# client to consume this service using nswag as part of a build. The open API spec has an attribute in one of the response models which is called System as an int. When…
DShorty
  • 582
  • 1
  • 6
  • 14
0
votes
0 answers

How to generate types (typescript) for graphql fragments with dynamic strings as query names

When using type generators like apollo client:codegen or others, how do you generate the types for things like this: const query = gql` query ${model}Aggregate($where: ${typename}_bool_exp) {...} ` Am getting an error : Error: Syntax…
O. Mills
  • 216
  • 2
  • 10
0
votes
0 answers

How to extract and concatenate bits in LLVM?

I want to be able to extract and concatenate bits that make up different llvm::Value's. For example, I want to be able to extract 5 bits from offset 3 from a i32, or to concatenate bits of i5 and i3 to get i8. What is the best way to do this? I…
0
votes
1 answer

Problem with program generated by rpcgen (RPC, C)

I have a problem with an assignment. I have to make a program that receives time and date from a remote host using the RPC protocol and generated by rpcgen. rpctime.x program RPCTIME { version RPCTIMEVERSION { long GETTIME() = 1; …
AlexVs86
  • 25
  • 7
0
votes
0 answers

Change animation theme when system theme is changing in UWP using Codegen

This question is continuation of this one, Change animation theme when system theme is changing in UWP using Lottie Basically I want to perform similar task using codegen. Could not find any way. Any help please?
Sumnoon
  • 71
  • 7
0
votes
1 answer

How to merge 2 graphql schemas on client, to auto-generate types?

I have a client that queries 2 endpoints. Now, how do I auto-generate types from 2 graphql schemas, when using 2 endpoints? Scripts I used up until now (with standard 1 endpoint) uses Apollo codegen (source): "schema": "npx apollo service:download…
justdvl
  • 698
  • 4
  • 15
0
votes
1 answer

App crashes after setting CoreData Codegen to Category / Extension

Context My app uses CoreData and for the first version I was just using the Class Definition as the Codegen Method for all Entities. However, since I changed it to Category / Extension, the app crashes every time a View with a @FetchedResult…
christophriepe
  • 1,157
  • 12
  • 47
0
votes
1 answer

Set Min and Max values between 0.1 and 0.9 in OpenApi

I defined missingRatio variable in my openApi yaml file as below. Openapi version is "3.0.0" api.yaml missingRatio: type: number format: float minimum: 0.1 maximum: 0.3 default: 0.2 multipleOf: 0.1 description: "Ratio of data to remove…
Abdusoli
  • 661
  • 1
  • 8
  • 24
0
votes
0 answers

How to call VS command to paste Json as C# from code?

There is a very useful command in Visual Studio, which permits to paste json from clipboard to C# classes. Is there a way to use this function (through automation, library or any other way) from our code ? Thank you in advance
Poc
  • 109
  • 10
0
votes
0 answers

Moshi Codegen take longer time since it uses reflection(aka."Class.classForName") to create the generated adapter. Is there a way to avoid this?

Adapters generated via codegen cannot be added in the Moshi.Builder().add(Type, JsonAdapter). So moshi doesn't know how to create the compile-time generated adapter. It uses reflection to create them, which adds a significant overhead on low-end…
Archana Prabhu
  • 355
  • 4
  • 5
0
votes
1 answer

Is there a way to extract a common interface from multiple classes in C#

I've got some code generated from an XSD, one of the properties is an array that can be one of 7 different classes, all these classes share some fields so I would like to create an interface so I can iterate over the array and access the 'tpl'…
Matt
  • 1,436
  • 12
  • 24
0
votes
3 answers

How to transforme Type to be a Int, float, bool or char struct in C#?

I am implementing a code generator in java that will create a C# code. When I need to use Console.ReadLine() the variable have a type, but I don't know the type when I am generating the code. So, is it possible to convert the type from…