CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)

PyCharm や Intellij IDEA Ultimate の 「Debug」 で見かけました。


/path/to/python3.11 /path/to/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.app.plugins/python/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --client 127.0.0.1 --port 59014 --file /path/to/test.py 
-------------------------------------------------------------------------------
pydev debugger: CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)
pydev debugger: The debugger may still function, but it will work slower and may miss breakpoints.
pydev debugger: Related bug: http://bugs.python.org/issue1666807
-------------------------------------------------------------------------------
Connected to pydev debugger (build 222.4345.14)
pydev debugger: Unable to find real location for: <frozen codecs>
pydev debugger: Unable to find real location for: <frozen importlib._bootstrap>
pydev debugger: Unable to find real location for: <frozen importlib._bootstrap_external>
pydev debugger: Unable to find real location for: <frozen zipimport>
pydev debugger: Unable to find real location for: <string>
pydev debugger: Unable to find real location for: <frozen posixpath>
pydev debugger: Unable to find real location for: <frozen _collections_abc>
pydev debugger: Unable to find real location for: <frozen os>
pydev debugger: Unable to find real location for: <frozen abc>
pydev debugger: Unable to find real location for: <__array_function__ internals>
pydev debugger: Unable to find real location for: <frozen genericpath>
pydev debugger: Unable to find real location for: <frozen io>

以下を Edit Configrations から Interpreter options に追加すれば消える。


-Xfrozen_modules=off

CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)

「Run」 や OS の Termnal から実行すると出ない。

IDE に同梱されてる pydevd が古くて、

Debug するスクリプト(インターラプタ) と pydev の バージョン間の相性がイマイチ

という感じか。

非stable な 3.11.x なども、コマンドのオプションとしてつけると消える。

👉 課題 1666807: Incorrect file path reported by inspect.getabsfile() - Python tracker hatena-bookmark
👉 "CRITICAL WARNING" error debugging Python 3.11 code : PY-56939 hatena-bookmark
👉 fabioz/PyDev.Debugger: Sources for the debugger used in PyDev, PyCharm and VSCode Python hatena-bookmark


【WordPress】メニューから「テーマファイルエディタ」 が消える件 - Really Simple SSL

いきなり左端のメニューから

「テーマファイルエディタ」

が消えて、編集できなくなった。

原因はこのプラグインでした。

無効化したらもとに戻りました。

Really Simple SSL

不要じゃね? このプラグイン。

権限関連を厳しくしたんだろうとは思うが。

最近アップデートしたらこのざまです。


【Android】Gradle Version Catalog 関連のプラグインを探す

Gradle Version Catalog。

TOML ファイル作って使ってみました。

Android Studio でこんな。

⚠ This project uses Gradle Version Catalogs: this tool may not behave as expected.

なんか気持ちが悪いですよね。

update dependencies まわりがこれまで通りに正常に動いてるかどうか、心配になります。

そこらをチェックしてくれるツールを探します。

以下、人気順。


👉 ben-manes/gradle-versions-plugin: Gradle plugin to discover dependency updates hatena-bookmark


👉 jmfayard/refreshVersions: Life is too short to google for dependencies and versions hatena-bookmark


👉 littlerobots/version-catalog-update-plugin: Gradle plugin for updating a project version catalog hatena-bookmark

それぞれどこかで見かけたことがあると思います。

機能は、そのうち Android Studio にマージされるんだろうなと妄想。

👉 Jetpack Compose Samples でも使われている「Version catalog update plugin」で libs.versions.toml を書き出してみる hatena-bookmark
👉 「⚠ This project uses Gradle Version Catalogs: this tool may not behave as expected.」→ 今現在、Gradle Version Catalog には gradle-versions-plugin が必須では? hatena-bookmark


【Jetpack Compose】Accompanist から切り替えた Material の PullRefreshIndicator が消えない件

こんな記事を見つけまして。

まだ @ExperimentalMaterialApi になりますが Pull-to-refresh は Accompanist から卒業し、Material Design ライブラリーに追加されました。でも、Accompanist の SwipeRefreshLayout と異なって全体のレイアウトではなくインジケーターだけが追加されました。


var refreshing by remember { mutableStateOf(false) }

val state = rememberPullRefreshState(
    refreshing = refreshing,
    onRefresh = { .. }
)

Box(modifier = Modifier.pullRefresh(state = state)) {
    LazyColumn {
        if (!refreshing) {
            items(..)
        }
    }

    PullRefreshIndicator(
        refreshing = refreshing, 
        state = state, 
        modifier = Modifier.align(Alignment.TopCenter)
    )
}

👉 Jetpack Compose v1.3.0に気になったAPIのまとめ - Goodpatch Tech Blog hatena-bookmark

便利そうなので使ってみました。

 

■ Indicator が消えない!

公式のサンプルを見ながら、


import androidx.compose.material.pullrefresh.PullRefreshIndicator
import androidx.compose.material.pullrefresh.pullRefresh
import androidx.compose.material.pullrefresh.rememberPullRefreshState

val refreshScope = rememberCoroutineScope()
var refreshing by remember { mutableStateOf(false) }
var itemCount by remember { mutableStateOf(15) }

fun refresh() = refreshScope.launch {
    refreshing = true
    delay(1500)
    itemCount += 5
    refreshing = false
}

val state = rememberPullRefreshState(refreshing, ::refresh)

Box(Modifier.pullRefresh(state)) {
    LazyColumn(Modifier.fillMaxSize()) {
        if (!refreshing) {
            items(itemCount) {
                ListItem { Text(text = "Item ${itemCount - it}") }
            }
        }
    }

    PullRefreshIndicator(refreshing, state, Modifier.align(Alignment.TopCenter))
}

👉 androidx.compose.material.pullrefresh  |  Android Developers hatena-bookmark

実装してみましたが、引っ張る前から、表示されたまま消えない!! (少し読み込みが長いです。)

PullRefreshIndicator-scale=false

読み込み終了後、Box の範囲からは外れていくんだけども、消えない。

何なんすか。

バグ?

👉 PullRefresh: indicator left visible on screen [248274004] - Visible to Public - Issue Tracker hatena-bookmark

 

■ 対応策

PullRefreshIndicatorscale = true にします。

The default indicator for Compose pull-to-refresh, based on Android's SwipeRefreshLayout.

👉 androidx.compose.material.pullrefresh  |  Android Developers hatena-bookmark

以下のように追加します。


PullRefreshIndicator(
  refreshing = refreshing,
  state = state,
  modifier = Modifier.align(Alignment.TopCenter),
  scale = true // *
)

結果。

PullRefreshIndicator-scale=true

消えました。とりあえず。

上下に移動しながら 拡大 → 縮小 して、消えてるように見えます。

この Indicator て、確か以前は、scale してましたよね?

👉 Jetpack Compose Accompanist — An FAQ. | by Ben Trengrove | Android Developers | Medium hatena-bookmark


Warning: Your Xcode (14.0.1) is too outdated.

こんなのでました。


❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Xcode (14.0.1) is too outdated.
Please update to Xcode 14.1 (or delete it).
Xcode can be updated from the App Store.

❯ softwareupdate --list
Software Update Tool

Finding available software
No new software available.

❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 14.1.

Warning: Your Xcode (14.0.1) is outdated.
Please update to Xcode 14.1 (or delete it).
Xcode can be updated from the App Store.


❯ softwareupdate --all --install --force
Software Update Tool

Finding available software
No updates are available.

❯ sudo rm -rf /Library/Developer/CommandLineTools
Password:

❯ sudo xcode-select --install
xcode-select: note: install requested for command line developer tools

AppStore は、14.0.1 のまま。

ダメですね。

表示されたマニュアルダウンロード先を見てみたら、

RC2 なんだが。

👉 More - Downloads - Apple Developer hatena-bookmark

調べてみると、多少、話題にはなってる。

Please install the release candidate. Xcode 14.0.1 does not include the SDK for Ventura.

👉 Brew apparently requires a nonexistent xcode version? · Discussion #3822 · Homebrew hatena-bookmark

もう、手動GUI作業で入れちゃいました XcodeRC と、そのCLI。

dmg とでかい xip ファイルでした。

Xcode 14.1

確認。


❯ softwareupdate --list
Software Update Tool

Finding available software
No new software available.

❯ xcode-select -v
xcode-select version 2396.

❯ xcodebuild -version
Xcode 14.1
Build version 14B47b

❯ brew doctor
Your system is ready to brew.

これでいきますわ、とりあえず。

👉 Weird that they didn't release Xcode 14.1 yesterday, it's required for Mac OS 13 development. | MacRumors Forums hatena-bookmark