Skip to content

Commit 0b0337d

Browse files
authored
Merge branch 'master' into all-contributors/add-Varadraj75
2 parents 96f465b + 50b23b9 commit 0b0337d

File tree

17 files changed

+63
-248
lines changed

17 files changed

+63
-248
lines changed

Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:16.0.1-jdk-slim-buster
1+
FROM eclipse-temurin:17-jdk-jammy
22

33
# Install updates
44
RUN apt-get update -yq \
@@ -17,16 +17,14 @@ ENV PATH="${PATH}:/usr/local/go/bin"
1717

1818
# Install dotnet SDK
1919
RUN apt install apt-transport-https dirmngr gnupg ca-certificates -yq \
20-
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
21-
&& echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list \
2220
&& apt update -yq \
2321
&& apt install mono-devel -yq
2422

2523
# Install rust
2624
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
2725

2826
# Install Python
29-
RUN apt-get install -yq python
27+
RUN apt-get install -yq python3 python-is-python3
3028

3129
# Install Kotlin
3230
RUN apt install -yq wget unzip \
@@ -37,10 +35,8 @@ RUN apt install -yq wget unzip \
3735
ENV PATH $PATH:/usr/lib/kotlinc/bin
3836

3937
# Install PHP
40-
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \
41-
&& echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list \
42-
&& apt-get update -yq \
43-
&& apt-get install -y php8.2
38+
RUN apt-get update -yq \
39+
&& apt-get install -yq php php-cli php-common php-xml php-mbstring php-curl
4440

4541
# Setup library
46-
RUN apt-get install -yq chromium
42+
RUN apt-get install -yq chromium-browser

modelina-cli/package-lock.json

Lines changed: 6 additions & 203 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generators/rust/RustRenderer.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { FormatHelpers } from '../../helpers/FormatHelpers';
55
import {
66
deriveCopy,
77
deriveHash,
8-
derivePartialEq,
98
deriveEq,
109
derivePartialOrd,
1110
deriveOrd
@@ -37,16 +36,20 @@ export abstract class RustRenderer<
3736
}
3837

3938
renderMacro(model: ConstrainedMetaModel): string {
40-
const derive: string[] = ['Serialize', 'Deserialize', 'Clone', 'Debug'];
39+
const derive: string[] = [
40+
'Serialize',
41+
'Deserialize',
42+
'Clone',
43+
'Debug',
44+
'PartialEq'
45+
];
46+
4147
if (deriveHash(model)) {
4248
derive.push('Hash');
4349
}
4450
if (deriveCopy(model)) {
4551
derive.push('Copy');
4652
}
47-
if (derivePartialEq(model)) {
48-
derive.push('PartialEq');
49-
}
5053
if (deriveEq(model)) {
5154
derive.push('Eq');
5255
}
@@ -56,6 +59,7 @@ export abstract class RustRenderer<
5659
if (deriveOrd(model)) {
5760
derive.push('Ord');
5861
}
62+
5963
derive.sort();
6064
return `#[derive(${derive.join(', ')})]`;
6165
}

0 commit comments

Comments
 (0)