3,913 questions
0
votes
1
answer
54
views
Which scope does the {$I-} directive have in Pascal?
I disable I/O checking inside a procedure:
procedure RewriteText(
FileName: string;
var TextFile: text;
var ErrMsg: string
);
begin
{$I-}
assign(TextFile, FileName);
rewrite(...
0
votes
2
answers
74
views
jaxb2 inheritance plugin does not extend a class in /src/test/java
I'm on a java/maven project, using the jaxb2 inheritance plugin in order to define parent classes for xjc-generated java classes.
I'm having this xsd:
<?xml version="1.0" encoding="...
1
vote
1
answer
120
views
How is rust able to optimize Option::is_some_and so effectively? [closed]
Looking at the codegen of a check inside for-loop I wanted to see if there is an optimization opportunity by outlining is_some_and but both cases had the same codegen.
struct V {
len: Option<...
3
votes
1
answer
228
views
How can I iterate over struct fields at compile time in Zig to generate a serializer?
I'm learning Zig and I'm trying to write a generic function that automatically serializes any struct into JSON. In languages like Rust or Go, there are libraries that can iterate over the fields of a ...
0
votes
0
answers
103
views
Annotation based code generation fails compilation before code is generated
I am writing a Java library in which I'm attempting to auto-generate some boilerplate code using annotations. The generated code is a large hierarchy of sealed interfaces with lots of cyclic ...
0
votes
0
answers
127
views
sea-orm cli does not find postgres schema and generates an empty entity file
I'm working in an application that's currently switching from surrealdb to regular postgres using the sea-orm crate, but the cli is failing to find anything. I'm not sure what I'm doing wrong, as I'm ...
1
vote
1
answer
42
views
.Net 9 codegen in Rider adding --sqllte flag by default. Any fixes?
I'm doing some .Net apps on mac, using Rider. Regardless if the whole project is scaffolded with VS Code or Rider itself, anytime when I hit Add Controller it the code generator with --sqlite flag ...
-4
votes
1
answer
88
views
Syntax-aware deletion of code blocks in a lua file [closed]
I created a bash script that automatically populates a lua config file with ssh-mux settings according to my input. The populated config file looks like this:
ssh_domains.lua
local M = {}
M....
4
votes
1
answer
94
views
How to call a SymForce auto-generated function with a user defined type?
Suppose I have a Python function Foo() that I'm auto-generating to C++ with SymForce's codegen functionality. It's a complicated function with a lot of parameters, so I want to pass in a Params struct ...
0
votes
1
answer
83
views
Generating, compiling and executing JUnit on the fly
I have a class that generates Restassured JUnit tests in a specific subfolder of my build/tests/ structure, based on some postman test collections.
I have written a test to take all the *....
0
votes
1
answer
64
views
How can I pass variables to a procedurally generated global function in Lua?
I was recently trying to write event callback handlers for my UI system, and I've been having trouble accessing higher-scope variables from a procedurally generated global function.
Here's some sample ...
0
votes
1
answer
54
views
How to write an XJC plugin that replaces JClass implementations for types
I have an xsd with some very large enums - if I allow XJC to generate actual Java enums for these types, I run into the problem described here:
Does an Enum Class containing 2000+1 Enum Constants hit ...
0
votes
0
answers
80
views
404 during introspection in graphql with dynamic code generation
Im trying to build a graphql schema during runtime without any static schema definitions. I have the following classes
@Component
public class GraphQLProvider {
private GraphQL graphQL;
...
2
votes
0
answers
111
views
Roslynator fail with C# source generator
I have a project specific roslyn source generator. It is a project reference in a library (which is also a project reference) in my application.
<ProjectReference Include="$(RepoRoot)\...
3
votes
2
answers
137
views
Template for creating methods in Visual Studio in C#
When creating a new method in a class in Visual Studio, the IDE generates the method as internal, but I want public to be the default.
I didn't find a way to change this behavior. I know that there ...
0
votes
1
answer
73
views
How can I programmatically generate the list of canonical Postgresql keywords? [duplicate]
How can I obtain the list of Postgres keywords? Failing a programmatic solution, where can I look inside the Postgres project to get this list?
Context: for use in a code generation tool.
5
votes
0
answers
2k
views
Codegen enums trigger error "Typescript enum is not supported in strip-only mode" after updating node from 23.5.0 to 23.6.0
After upgrading from node 23.5.0 to 23.6.0, our Playwright test suites stopped working. It looks like it's related to an "--experimental-strip-types" setting.
We've fixed our code by ...
0
votes
0
answers
100
views
How to access "Content" files in incremental source generator?
I'm trying to build an incremental source generator that will output nested classes with strings for each content file in my project containing its file path like so:
public static class Content
{
...
1
vote
0
answers
33
views
I can't figure out the correct behavior of the macro
At the moment (Dart 3.6.0) creates a macro file with the following content:
part of 'path_to_parent_file.dart';
// Generated code
Which means it is part of the parent file.
Everything works fine in ...
0
votes
0
answers
93
views
RTW Embedded coder generating #includes in C file instead of H file
Environment:
Matlab R2022b
Simulink model
Problem:
I was generating code from Embedded coder and generated codes have header file declaration present in the C file instead of H file. I used the same ...
1
vote
1
answer
78
views
Is there a programmatic way to generate s-functions directly out of Simulink blocks
I would require wrapping the logic of my Simulink model to be obfuscated or hidden. One of the ways to perform it is to create a similar s-function block with the object code generated from the same ...
1
vote
0
answers
133
views
How can I check scopes in oapi-codegen middleware?
I'm completely new to oapi-codegen and its generated code.
I tried to generate echo, as well as chi-server code.
I defined, in my openapi specification security like this:
/itworks:
get:
...
0
votes
1
answer
133
views
Multiple build actions per file in Visual Studio
I have a few C# (*.cs) files in my project that need to be included in compilation as well as distributed as source code along with the application (the application itself is not open-source).
...
2
votes
0
answers
181
views
Mason Bricks dynamic views with directories from args with loop
I am using Mason Bricks.
I know, you can also have loop in files. But is there also a way to use loops to create files from given args?
This is the structure I would like to accomplish:
...
1
vote
1
answer
546
views
Access to R.swift library resources generated inside the swift package from an Xcode project
My task is to bring R.swift into our own SPM, so that the code of app itself still has access to the generated Rswift resources.
Our package setup looks like this
let package = Package(
name: &...