# Reducing file entries in Docc to static site conversion

**URL:** <https://forums.swift.org/t/reducing-file-entries-in-docc-to-static-site-conversion/80123>\
**Category:** Swift-DocC\
**Created:** [May 26, 2025, 10:01am UTC](https://forums.swift.org/t/reducing-file-entries-in-docc-to-static-site-conversion/80123 "2025-05-26T10:01:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![perpetualdarkness](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@perpetualdarkness](https://forums.swift.org/u/perpetualdarkness)\
**Post date:** [May 26, 2025, 10:01am UTC](https://forums.swift.org/t/reducing-file-entries-in-docc-to-static-site-conversion/80123/1 "2025-05-26T10:01:16Z")

</div>

I want to significantly reduce the amount of file entries generated because currently ever protocol etc is generated which I don't want to.

I browsed through the swift forum and I cannot find anything that helped with this.  
Tried using `OTHER_SWIFT_FLAGS=-"skip-synthesized-symbols"` but the documentation fails.

Is there any other way to skip synthesized symbols by some flag that I can include in my below code?

Current Script:

```swift
xcodebuild docbuild \
        -workspace Example.xcworkspace \
        -scheme "$SCHEME" \
        -destination "$DESTINATION" \
        -derivedDataPath "$DERIVED_DATA_PATH" \
        CODE_SIGN_IDENTITY="" \
        CODE_SIGNING_REQUIRED=NO \
        CODE_SIGNING_ALLOWED=NO 
      

xcrun docc process-archive transform-for-static-hosting "$DOCCARCHIVE_PATH" \
      --output-path "$OUTPUT_PATH" \
      --hosting-base-path "$BASE_PATH"

```

Also tried using  
`OTHER_SWIFT_FLAGS="-skip-protocol-implementations"` but no luck

---

<div class="post-metadata">

**Author:** ![finestructure](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/finestructure/32/34879_2.png) [@finestructure](https://forums.swift.org/u/finestructure)\
**Post date:** [May 26, 2025, 10:16am UTC](https://forums.swift.org/t/reducing-file-entries-in-docc-to-static-site-conversion/80123/2 "2025-05-26T10:16:26Z")

</div>

Try

```swift
... docbuild ... OTHER_DOCC_FLAGS="-skip-synthesized-symbols"

```

that should do the trick.

(or `--skip-synthesized-symbols` – I'm never sure which parts take single `-` vs `--` options)

---

<div class="post-metadata">

**Author:** ![perpetualdarkness](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@perpetualdarkness](https://forums.swift.org/u/perpetualdarkness)\
**Post date:** [May 26, 2025, 10:30am UTC](https://forums.swift.org/t/reducing-file-entries-in-docc-to-static-site-conversion/80123/3 "2025-05-26T10:30:36Z")

</div>

Tried both but Build Documentation fails for no reason

---

<div class="post-metadata">

**Author:** ![ronnqvist](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ronnqvist/32/20110_2.png) [@ronnqvist](https://forums.swift.org/u/ronnqvist)\
**Post date:** [May 26, 2025, 2:03pm UTC](https://forums.swift.org/t/reducing-file-entries-in-docc-to-static-site-conversion/80123/4 "2025-05-26T14:03:25Z")

</div>

Like Vera pointed out in this other thread, the `-skip-synthesized-symbols` is only a flag for the `swift-symbolgraph-extract` tool. That's why it doesn't work to pass it to the Swift compiler.

> [@Xcode Docc huge archive file size](https://forums.swift.org/t/xcode-docc-huge-archive-file-size/59885/22):
>
> The nightly toolchain with my PR will be able to accept -skip-protocol-implementations in OTHER\_SWIFT\_FLAGS just fine. The reason that -skip-synthesized-symbols doesn't work is that it wasn't set up to be accepted during a regular compilation, just the swift-symbolgraph-extract tool. However, since Xcode doesn't run that tool, it doesn't work. disappointed

That's also why it doesn't work (you get a "Unknown option" command line validation error) to pass it to DocC.

> [@finestructure](#):
>
> Try
> 
> ```swift
> ... docbuild ... OTHER_DOCC_FLAGS="-skip-synthesized-symbols"
> 
> ```

---

<div class="post-metadata">

**Author:** ![perpetualdarkness](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@perpetualdarkness](https://forums.swift.org/u/perpetualdarkness)\
**Post date:** [May 26, 2025, 2:25pm UTC](https://forums.swift.org/t/reducing-file-entries-in-docc-to-static-site-conversion/80123/5 "2025-05-26T14:25:24Z")

</div>

What are some other flags/ways I can use to reduce the number of file entries through just the script I mentioned in my post? Most stuff like accessibility json files etc are a lot and also the view-implementation has ton of file entries
