Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler/runner version command fixes #2121

Merged
merged 3 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions webapp/src/DataFixtures/DefaultData/LanguageFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function load(ObjectManager $manager): void
['hs', 'haskell', 'Haskell', ['hs', 'lhs'], false, null, false, true, 1, 'hs', '', ''],
['java', 'java', 'Java', ['java'], false, 'Main class', true, true, 1, 'java_javac_detect', 'javac -version', 'java -version'],
['js', 'javascript', 'JavaScript', ['js'], false, 'Main file', false, true, 1, 'js', '', ''],
['lua', 'lua', 'Lua', ['lua'], false, null, false, true, 1, 'lua', 'kotlinc -version', 'kotlin -version'],
['kt', 'kotlin', 'Kotlin', ['kt'], true, 'Main class', false, true, 1, 'kt', '', ''],
['lua', 'lua', 'Lua', ['lua'], false, null, false, true, 1, 'lua', '', ''],
['kt', 'kotlin', 'Kotlin', ['kt'], true, 'Main class', false, true, 1, 'kt', 'kotlinc -version', 'kotlin -version'],
['pas', 'pascal', 'Pascal', ['pas', 'p'], false, 'Main file', false, true, 1, 'pas', '', ''],
['pl', 'pl', 'Perl', ['pl'], false, 'Main file', false, true, 1, 'pl', '', ''],
['plg', 'prolog', 'Prolog', ['plg'], false, 'Main file', false, true, 1, 'plg', '', ''],
Expand Down
28 changes: 14 additions & 14 deletions webapp/src/Entity/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ class Language extends BaseApiEntity
#[Serializer\Exclude]
private ?string $runnerVersion = null;

#[ORM\Column(type: 'string', length: 255, nullable: true, options: ['comment' => 'Runner version command'])]
#[Serializer\Exclude]
private ?string $runnerVersionCommand = null;

#[ORM\Column(type: 'string', length: 255, nullable: true, options: ['comment' => 'Compiler version command'])]
#[Serializer\Exclude]
private ?string $compilerVersionCommand = null;

#[ORM\Column(type: 'string', length: 255, nullable: true, options: ['comment' => 'Runner version command'])]
#[Serializer\Exclude]
private ?string $runnerVersionCommand = null;

/**
* @param Collection<int, Version> $versions
*/
Expand Down Expand Up @@ -179,25 +179,25 @@ public function setRunnerVersion(?string $runnerVersion): Language
return $this;
}

public function getRunnerVersionCommand(): ?string
public function getCompilerVersionCommand(): ?string
{
return $this->runnerVersionCommand;
return $this->compilerVersionCommand;
}

public function setRunnerVersionCommand(?string $runnerVersionCommand): Language
public function setCompilerVersionCommand(?string $compilerVersionCommand): Language
{
$this->runnerVersionCommand = $runnerVersionCommand;
$this->compilerVersionCommand = $compilerVersionCommand;
return $this;
}

public function getCompilerVersionCommand(): ?string
public function getRunnerVersionCommand(): ?string
{
return $this->compilerVersionCommand;
return $this->runnerVersionCommand;
}

public function setCompilerVersionCommand(?string $compilerVersionCommand): Language
public function setRunnerVersionCommand(?string $runnerVersionCommand): Language
{
$this->compilerVersionCommand = $compilerVersionCommand;
$this->runnerVersionCommand = $runnerVersionCommand;
return $this;
}

Expand All @@ -217,7 +217,7 @@ public function getCompileExecutableHash(): ?string
#[Serializer\VirtualProperty]
#[Serializer\SerializedName('compiler')]
#[Serializer\Exclude(if:'object.getCompilerVersionCommand() == ""')]
public function getCompilerData(): ?array
public function getCompilerData(): array
{
$ret = [];
if (!empty($this->getCompilerVersionCommand())) {
Expand All @@ -235,7 +235,7 @@ public function getCompilerData(): ?array
#[Serializer\VirtualProperty]
#[Serializer\SerializedName('runner')]
#[Serializer\Exclude(if:'object.getRunnerVersionCommand() == ""')]
public function getRunnerData(): ?array
public function getRunnerData(): array
{
$ret = [];
if (!empty($this->getRunnerVersionCommand())) {
Expand Down
Loading