-
Notifications
You must be signed in to change notification settings - Fork 327
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
Prepare API generator for automatic check #12175
base: develop
Are you sure you want to change the base?
Conversation
Or for a module that contains only imports.
@@ -11,7 +12,7 @@ | |||
import org.enso.filesystem.FileSystem; | |||
import org.enso.pkg.QualifiedName; | |||
import scala.collection.immutable.Seq; | |||
import scala.jdk.CollectionConverters; | |||
import scala.jdk.javaapi.CollectionConverters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we be using org.enso.scala.wrapper
modules's convertors anyway?
public static <File> File defaultOutputDir(org.enso.pkg.Package<File> pkg) { | ||
var fs = pkg.fileSystem(); | ||
var docs = fs.getChild(pkg.root(), "docs"); | ||
var api = fs.getChild(docs, "api"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could select the directory based on the "type of documentation" - e.g. api
for --docs=api
and md
for --docs
or --docs=md
@@ -8,7 +8,7 @@ add_specs suite_builder = suite_builder.group "Standard.Base Signature Checks" g | |||
setup = Api_Setup.create 'Standard' 'Base' [ "--docs=api" ] | |||
|
|||
group_builder.specify "Standard.Base.Meta" <| | |||
snapshot = setup.api_dir / "Standard" / "Base" / "Meta.md" | |||
snapshot = setup.api_dir / "Meta.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping namespace
and name
from the directory structure? That is probably good idea. CCing @radeusgd
Pull Request Description
First step of #10507. Preparations for the
Standard.Base
API check job that will be introduced in a follow-up PR. In this PR, the functionality of DocsEmitSignatures is modified and tested such that its generated signatures for a module is ready for usage in the API check job. Most importantly, the signatures are sorted.Sorting of the generated signatures prevents future false-positive failures of the API check job when somebody just reorders items in a module.
Important Notes
Further modifications to DocsEmitSignatures:
docs/api
corresponds to the directory structure insrc
.docs/api/Standard/Base/Any.md
but now it is justdocs/api/Any.md
(which was generated fromsrc/Any.enso
).Example output is:
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.