Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
feat: remove generation of Safe-DS stubs (#1396)
Browse files Browse the repository at this point in the history
### Summary of Changes

Remove the generation of Safe-DS stubs since it's based on the old Xtext
implementation of the DSL. This will instead become a [standalone
command line tool](https://github.com/Safe-DS/Stub-Generator).

---------

Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
  • Loading branch information
lars-reimann and megalinter-bot committed Jul 10, 2023
1 parent 341a1bf commit 59a555b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 1,597 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.safeds.apiEditor.codegen

import com.larsreimann.safeds.constant.SdsFileExtension
import com.safeds.apiEditor.mutableModel.PythonModule
import com.safeds.apiEditor.mutableModel.PythonPackage
import java.io.BufferedInputStream
Expand All @@ -18,7 +17,6 @@ fun PythonPackage.generateCode(): File {
for (module in modules) {
try {
createPythonFile(workingDirectory, module)
createStubFile(workingDirectory, module)
} catch (e: Exception) {
e.printStackTrace()
}
Expand All @@ -37,14 +35,6 @@ private fun createPythonFile(workingDirectory: File, module: PythonModule) {
.createFile(module.toPythonCode())
}

private fun createStubFile(workingDirectory: File, module: PythonModule) {
workingDirectory
.resolve("stub")
.resolve(module.name.replace('.', '/'))
.resolve(module.name.split(".").last() + "." + SdsFileExtension.Stub)
.createFile(module.toStubCode())
}

private fun File.createFile(content: String) {
parentFile.mkdirs()
createNewFile()
Expand Down

This file was deleted.

0 comments on commit 59a555b

Please sign in to comment.