Skip to content

[native_doc_dartifier] Getting Summary of Classes #2337

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marshelino-maged
Copy link
Contributor

@marshelino-maged marshelino-maged commented Jun 1, 2025

Related to #2309

  • Getting the summary of the classes only.
  • The idea is to get the context for the LLM as
- class Foo extends _Foo
    - Constructors
    - Setters
    - Getters
    - Methods
        - int calculate()
     - Fields
        - int a
        - int b
  • Why not only get the class name?
    Put the interface or abstract keyword to help the LLM not try to make an object from those classes.
    Put implements and extends because sometimes functions need an explicit class as a parameter, so the LLM needs this context so that it can pass the Foo object to this function.
class Foo implements Bar {} 
function(Bar b){}

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.

Copy link

github-actions bot commented Jun 2, 2025

PR Health

Changelog Entry
Package Changed Files
package:native_doc_dartifier pkgs/native_doc_dartifier/lib/src/ast.dart
pkgs/native_doc_dartifier/lib/src/public_abstractor.dart
pkgs/native_doc_dartifier/pubspec.yaml

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ⚠️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
pkgs/native_doc_dartifier/lib/src/ast.dart
pkgs/native_doc_dartifier/lib/src/public_abstractor.dart
pkgs/native_doc_dartifier/test/public_abstractor_test.dart

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/native_doc_dartifier/example/native_doc_dartifier_example.dart
pkgs/native_doc_dartifier/lib/native_doc_dartifier.dart
pkgs/native_doc_dartifier/lib/src/native_doc_dartifier_base.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

This check can be disabled by tagging the PR with skip-license-check.

@HosseinYousefi
Copy link
Member

Please add the license at the beginning of all the source files:

// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:test/test.dart';

void main() {
group('Class summary group', () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a CI workflow that runs this (and other) tests. It's probably fine to only run it on a single OS like ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants