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

Add public keyword #50105

Merged
merged 69 commits into from
Sep 14, 2023
Merged

Add public keyword #50105

merged 69 commits into from
Sep 14, 2023

Commits on Jun 26, 2023

  1. mwe including export (scoped-true), a, b, c and names

    module CreatePairs
        export create_pair
        export (scoped-true), cp
    
        """
            create_pair(x)
    
        creates the pair `x => x`
        """
        create_pair(x) = _create_pair(x)
    
        """
            cp(x)
    
        creates the pair `x => x`
        """
        cp(x) = _create_pair(x)
    
        """
            _create_pair(x)
    
        creates the pair `x => x`
        """
        _create_pair(x) = x => x
    end
    
    julia> using .CreatePairs
    
    julia> names(CreatePairs)
    3-element Vector{Symbol}:
     :CreatePairs
     :cp
     :create_pair
    
    julia> names(CreatePairs, scoped=false)
    2-element Vector{Symbol}:
     :CreatePairs
     :create_pair
    
    julia> create_pair(1)
    1 => 1
    
    julia> cp(1)
    ERROR: MethodError: no method matching cp(::Int64)
    
    Closest candidates are:
      cp(::AbstractString, ::AbstractString; force, follow_symlinks)
       @ Base file.jl:376
    
    Stacktrace:
     [1] top-level scope
       @ REPL[7]:1
    
    julia> CreatePairs.cp(1)
    1 => 1
    
    julia> _create_pair(1)
    ERROR: UndefVarError: `_create_pair` not defined
    Stacktrace:
     [1] top-level scope
       @ REPL[9]:1
    
    julia> CreatePairs._create_pair(1)
    1 => 1
    
    help?> create_pair
    search: create_pair
    
      create_pair(x)
    
      creates the pair x => x
    
    help?> CreatePairs.cp
      cp(x)
    
      creates the pair x => x
    
    help?> CreatePairs._create_pair
      _create_pair(x)
    
      creates the pair x => x
    Lilith Hafner authored and Lilith Hafner committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    5b3d8c1 View commit details
    Browse the repository at this point in the history
  2. add Base.isinternal and use it to flag internal methods in their do…

    …cstrings
    
    module CreatePairs
        export create_pair
        export (scoped-true), cp
    
        """
            create_pair(x)
    
        creates the pair `x => x`
        """
        create_pair(x) = _create_pair(x)
    
        """
            cp(x)
    
        creates the pair `x => x`
        """
        cp(x) = _create_pair(x)
    
        """
            _create_pair(x)
    
        creates the pair `x => x`
        """
        _create_pair(x) = x => x
    end
    
    julia> using .CreatePairs
    
    julia> names(CreatePairs)
    3-element Vector{Symbol}:
     :CreatePairs
     :cp
     :create_pair
    
    julia> names(CreatePairs, scoped=false)
    2-element Vector{Symbol}:
     :CreatePairs
     :create_pair
    
    julia> create_pair(1)
    1 => 1
    
    julia> cp(1)
    ERROR: MethodError: no method matching cp(::Int64)
    
    Closest candidates are:
      cp(::AbstractString, ::AbstractString; force, follow_symlinks)
       @ Base file.jl:376
    
    Stacktrace:
     [1] top-level scope
       @ REPL[6]:1
    
    julia> CreatePairs.cp(1)
    1 => 1
    
    julia> _create_pair(1)
    ERROR: UndefVarError: `_create_pair` not defined
    Stacktrace:
     [1] top-level scope
       @ REPL[8]:1
    
    julia> CreatePairs._create_pair(1)
    1 => 1
    
    help?> create_pair
    search: create_pair
    
      create_pair(x)
    
      creates the pair x => x
    
    help?> CreatePairs.cp
      cp(x)
    
      creates the pair x => x
    
    help?> CreatePairs._create_pair
      INTERNAL
    
      ────────────────────────────────────────────────────────────────────
    
      _create_pair(x)
    
      creates the pair x => x
    Lilith Hafner authored and Lilith Hafner committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    665855e View commit details
    Browse the repository at this point in the history
  3. update documentation

    Lilith Hafner authored and Lilith Hafner committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    52f519e View commit details
    Browse the repository at this point in the history
  4. add more verbose clarificaiton of what is and is not public API (TODO…

    …: trim for concision and clarity)
    Lilith Hafner authored and Lilith Hafner committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    03f9e02 View commit details
    Browse the repository at this point in the history
  5. add prelimianry list of scoped-exported symbols for review

    Lilith Hafner authored and Lilith Hafner committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    7eb64a2 View commit details
    Browse the repository at this point in the history
  6. more docs (implement option 1 of #50105 (comment))

    Lilith Hafner authored and Lilith Hafner committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    c7192ea View commit details
    Browse the repository at this point in the history
  7. address @jariji's comments

    Lilith Hafner authored and Lilith Hafner committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    ec3b2f3 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. Configuration menu
    Copy the full SHA
    804f5ef View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2023

  1. Merge branch 'master' into scoped-export

    Lilith Hafner authored and Lilith Hafner committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    7d404f0 View commit details
    Browse the repository at this point in the history
  2. use JuliaSyntax#320 branch

    Lilith Hafner authored and Lilith Hafner committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    4dc10c4 View commit details
    Browse the repository at this point in the history
  3. bump JuliaSyntax

    Lilith Hafner authored and Lilith Hafner committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    5fd1f64 View commit details
    Browse the repository at this point in the history
  4. more changes for scoped export -> public

    Lilith Hafner authored and Lilith Hafner committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    b85ae46 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. try to make public list functional

    Lilith Hafner authored and Lilith Hafner committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    acc928a View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. bump juliasyntax

    Lilith Hafner authored and Lilith Hafner committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    a5162c2 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. bump JuliaSyntax

    Lilith Hafner authored and Lilith Hafner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    aacc187 View commit details
    Browse the repository at this point in the history
  2. fix lowering

    Lilith Hafner authored and Lilith Hafner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    145ad7f View commit details
    Browse the repository at this point in the history
  3. clarify internal symbol warning and add test for it

    Lilith Hafner authored and Lilith Hafner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    aea3d22 View commit details
    Browse the repository at this point in the history
  4. add test for names + public

    Lilith Hafner authored and Lilith Hafner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    f7d57ba View commit details
    Browse the repository at this point in the history
  5. don't autocomplete internals (ideally we _would_ autocomplete interna…

    …ls for `dev`ed packages and Base if built from source)
    Lilith Hafner authored and Lilith Hafner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    34844bb View commit details
    Browse the repository at this point in the history
  6. Merge branch 'master' into scoped-export

    Lilith Hafner authored and Lilith Hafner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    8241760 View commit details
    Browse the repository at this point in the history
  7. update FAQ (this change introduces comedy and therefore may be contro…

    …versial)
    Lilith Hafner authored and Lilith Hafner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    920244a View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2023

  1. Rename isinternal to ispublic and make all resolved symbols in Main p…

    …ublic
    
    because it is not idiomatic to mark symbols in Main as public. Helps with repl completions and docstrings.
    
    needs tests.
    Lilith Hafner authored and Lilith Hafner committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    9e61f96 View commit details
    Browse the repository at this point in the history
  2. fix typo in test/reflection.jl

    Lilith Hafner authored and Lilith Hafner committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    f75cb68 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2023

  1. change module docstring warning

    Lilith Hafner authored and Lilith Hafner committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    db7ba05 View commit details
    Browse the repository at this point in the history
  2. Make warning an Admonition

    Lilith Hafner authored and Lilith Hafner committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    7dbdd5e View commit details
    Browse the repository at this point in the history
  3. bump JuliaSyntax

    Lilith Hafner authored and Lilith Hafner committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    ac11ea4 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2023

  1. fix doc tests

    mostly, this was fixing the test files to either make demo bindings public or expect internal warnings when they are not
    additionally, fix internal warning for non-markdown content (give up instead of erroring)
    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    bd0ee87 View commit details
    Browse the repository at this point in the history
  2. remove internal warning tests from stdlib/REPL/test/docview.jl becaus…

    …e they are adequitely covered in base/test/docs.jl
    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    1dc9652 View commit details
    Browse the repository at this point in the history
  3. restore autocomplete for non-public symbols

    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    17b8834 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6e2ddec View commit details
    Browse the repository at this point in the history
  5. initialize public to false (woops!)

    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    1000988 View commit details
    Browse the repository at this point in the history
  6. more fixups for doc tests

    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    c5955c0 View commit details
    Browse the repository at this point in the history
  7. remove joke

    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    5ed2c7d View commit details
    Browse the repository at this point in the history
  8. fix repl tests

    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    5da758e View commit details
    Browse the repository at this point in the history
  9. fix precompile tests

    Lilith Hafner authored and Lilith Hafner committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    de8be2b View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2023

  1. bump juliasyntax to merged version

    Lilith Hafner authored and Lilith Hafner committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    d75725b View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2023

  1. Configuration menu
    Copy the full SHA
    05352df View commit details
    Browse the repository at this point in the history
  2. Remove _datatype_* publics

    LilithHafner authored Aug 3, 2023
    Configuration menu
    Copy the full SHA
    4b04f31 View commit details
    Browse the repository at this point in the history
  3. Remove symbols from public list

    Co-authored-by: Jameson Nash <[email protected]>
    LilithHafner and vtjnash authored Aug 3, 2023
    Configuration menu
    Copy the full SHA
    051f824 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a56ab4 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. remove newlines between bullet points

    Lilith Hafner authored and Lilith Hafner committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    6e2d809 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2023

  1. Apply suggestions from code review

    Co-authored-by: Claire Foster <[email protected]>
    LilithHafner and c42f authored Aug 13, 2023
    Configuration menu
    Copy the full SHA
    69cf8d4 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Claire Foster <[email protected]>
    LilithHafner and c42f authored Aug 13, 2023
    Configuration menu
    Copy the full SHA
    9d74beb View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' into scoped-export

    Lilith Hafner authored and Lilith Hafner committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    4b18e1d View commit details
    Browse the repository at this point in the history
  4. add show tests

    Lilith Hafner authored and Lilith Hafner committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    4ba71ab View commit details
    Browse the repository at this point in the history
  5. group public symbols a little better

    Lilith Hafner authored and Lilith Hafner committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    ce3a798 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. revert names to the most basic implementation (simply swap export=>pu…

    …blic) and publicize `isexported` and `ispublic`
    
    How to get the old behavior? `filter(isexported, names(args...; kw...)`
    
    The set of possible keywods and interacitons is huge and it is better to give folks composable functions than a giant, tangled keyword system that is bound to be eternaly cludgey to maintain backwards compatability.
    
    Documents but does not publicize `isdeprecated` and `isbindingresolved`.
    Lilith Hafner authored and Lilith Hafner committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    ca8eb44 View commit details
    Browse the repository at this point in the history
  2. fix typo

    Lilith Hafner authored and Lilith Hafner committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    6d1e2c7 View commit details
    Browse the repository at this point in the history
  3. fix typo

    Lilith Hafner authored and Lilith Hafner committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    2678523 View commit details
    Browse the repository at this point in the history
  4. revert unnecessary whitespace change

    Lilith Hafner authored and Lilith Hafner committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    528469b View commit details
    Browse the repository at this point in the history
  5. add tests for ispublic and add more tests for isexported

    Lilith Hafner authored and Lilith Hafner committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    082fb86 View commit details
    Browse the repository at this point in the history
  6. fix some tests

    Lilith Hafner authored and Lilith Hafner committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    3d09dae View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

  1. Do a better job of logging nonpublic access in help mode

    Lilith Hafner authored and Lilith Hafner committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    12bab72 View commit details
    Browse the repository at this point in the history
  2. remove obsolete tests

    Lilith Hafner authored and Lilith Hafner committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    0112e2c View commit details
    Browse the repository at this point in the history
  3. finalize struct

    Lilith Hafner authored and Lilith Hafner committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    66427c6 View commit details
    Browse the repository at this point in the history
  4. update tests

    Lilith Hafner authored and Lilith Hafner committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    067d69c View commit details
    Browse the repository at this point in the history
  5. add tests and fix "public names" header

    Lilith Hafner authored and Lilith Hafner committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    b688b60 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. update documentation throughout to refer to public and export now-cor…

    …rectly
    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    6ce6fdb View commit details
    Browse the repository at this point in the history
  2. fix cross refs

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    e57c63f View commit details
    Browse the repository at this point in the history
  3. update varinfo documentation

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    1a6e3dc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ebcdf24 View commit details
    Browse the repository at this point in the history
  5. Update checksums

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    d4418fe View commit details
    Browse the repository at this point in the history
  6. fix some tests

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    c4924c9 View commit details
    Browse the repository at this point in the history
  7. more test fixes

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    5835699 View commit details
    Browse the repository at this point in the history
  8. try switching to a different JuliaSyntax version

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    153b538 View commit details
    Browse the repository at this point in the history
  9. don't accidentally drop the module in testing

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    158d59f View commit details
    Browse the repository at this point in the history
  10. fix some doctests

    Lilith Hafner authored and Lilith Hafner committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    41f3729 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. Configuration menu
    Copy the full SHA
    fd5fb90 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Docstring fixup for Base.ispublic

    Co-authored-by: Gerhard Aigner <[email protected]>
    LilithHafner and laborg authored Sep 7, 2023
    Configuration menu
    Copy the full SHA
    ea7a141 View commit details
    Browse the repository at this point in the history