Skip to content

Commit

Permalink
Fix generation of untyped maps and array literals
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaid-Ajaj committed Jan 9, 2025
1 parent 32d1fc9 commit 6a97fdd
Show file tree
Hide file tree
Showing 28 changed files with 1,381 additions and 73 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
### Improvements

- Fix emitted functions for `assetArchive` and `remoteAsset` in generated programs
- Fix generation of `double` literals in generated programs
- Avoid calling invokes with dependencies on unknown resources
- Fix generation of untyped maps and array literals

### Bug Fixes
### Bug Fixes
5 changes: 1 addition & 4 deletions pkg/cmd/pulumi-language-java/language_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,15 @@ func TestLanguage(t *testing.T) {
// expectedFailures maps the set of conformance tests we expect to fail to reasons they currently do so, so that we may
// skip them with an informative message until they are fixed.
var expectedFailures = map[string]string{
"l1-output-array": "#1560 Empty array literals are not generated correctly",
"l1-output-map": "#1561 Map literals are not generated correctly",
"l1-output-string": "#1562 Large string literals are not generated correctly",
"l2-invoke-options": "#1563 Invoke argument and result handling",
"l2-invoke-options-depends-on": "#1563 Invoke argument and result handling",
"l2-invoke-secrets": "#1563 Invoke argument and result handling",
"l2-map-keys": "#1569 Spot and qualify duplicate identifiers",
"l2-map-keys": "#1561 Map literals are not generated correctly",
"l2-provider-grpc-config-schema-secret": "#1568 Don't generate duplicate files",
"l2-provider-grpc-config-secret": "#1568 Don't generate duplicate files",
"l2-provider-grpc-config": "#1568 Don't generate duplicate files",
"l2-resource-config": "#1566 Fix l2-resource-config / plugin download URL code generation",
"l2-resource-primitives": "#1565 Better generation of numeric literals",
"l2-resource-secret": "#1564 Fix l2-resource-secret",
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: l1-output-array
runtime: java
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.pulumi</groupId>
<artifactId>l1-output-array</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<encoding>UTF-8</encoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<mainClass>generated_program.App</mainClass>
<mainArgs/>
</properties>

<repositories>
<repository>
<id>repository-0</id>
<url>REPOSITORY</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.pulumi</groupId>
<artifactId>pulumi</artifactId>
<version>CORE.VERSION</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${mainClass}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${mainClass}</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-my-jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<mainClass>${mainClass}</mainClass>
<commandlineArgs>${mainArgs}</commandlineArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-wrapper-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<mavenVersion>3.8.5</mavenVersion>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 6a97fdd

Please sign in to comment.