resolve id against pkg.main